A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.
brokeyourbike/uid-keys is a Laravel package for a simple drop-in solution for providing uuid and ulid support for the ids of your eloquent models..
It currently has 0 GitHub stars and 1.578 downloads on Packagist (latest version 0.2.0).
Install it with composer require brokeyourbike/uid-keys.
Discover more Laravel packages by brokeyourbike
or browse all Laravel packages to compare alternatives.
Last updated
A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.
composer require brokeyourbike/uid-keys
use Illuminate\Database\Eloquent\Model;
use BrokeYourBike\UidKeys\Database\Eloquent\Ulid;
class ExampleModel extends Model
{
use Ulid;
/**
* The "type" of the auto-incrementing ID.
*
* @var string
*/
protected $keyType = 'string';
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
}
Code mainly stolen from the goldspecdigital/laravel-eloquent-uuid package.