ezitisitis / laravel-uuid
This package provides fast and furious UUID as primary key implementation instead of autoincrement
Fund package maintenance!
ezitisitis
Patreon
Requires
- php: ^8.2.0
- laravel/framework: ^10||^11
README
Installing
$ composer require ezitisitis/laravel-uuid
Usage
Replace Laravel model extension (example below)
use Illuminate\Database\Eloquent\Model; class MyAwesomeModel extends Model {
With
use EzitisItIs\LaravelUuid\Model; class MyAwesomeModel extends Model {
If you set $incrementing = true;
then it will continue to use incrementing ID.