Downloads
Stars
Version
This is a simple trait that will override the key on an eloquent model to create a UUID instead of an integer.
You can install the package via composer:
composer require jasonmccallister/laravel-uuid-as-id
Update your models to use the trait, and you are done!
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use JasonMcCallister\UuidAsId\Traits\UuidAsId;
class SomeModel extends Model
{
use UuidAsId;
// the rest of your model's code
}
composer test
The MIT License (MIT). Please see License File for more information.