sevenshores/eloquent-uuids

Laravel Eloquent Models Uuids
17 1
Install
composer require sevenshores/eloquent-uuids
License:Apache-2.0
Last Updated:Oct 7, 2016
Links: GitHub  ·  Packagist
Maintainer: ryanwinchester

Laravel Eloquent Uuids

To use it just install

composer require sevenshores/eloquent-uuids

then in you model you can do:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use SevenShores\Uuids\Uuids;

class Post extends Model
{
    use Uuids;

    public $incrementing = false;

    // . . .
}

Don't forget, in your migration for your model, for id field you should use:

$table->uuid('id')->primary();
Note:

I know I've seen a similar package to this in the past, but I don't remember where, and don't care to look for it, because I'd rather just make my own for my own use.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660