Laravel Eloquent Models Uuids

dev-master 2016-10-07 03:59 UTC

This package is not auto-updated.

Last update: 2020-11-27 22:48:53 UTC


To use it just install

composer require sevenshores/eloquent-uuids

then in you model you can do:


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:



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.