brokeyourbike/uid-keys
A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.
1,578
| Install | |
|---|---|
composer require brokeyourbike/uid-keys |
|
| Latest Version: | 0.2.0 |
| PHP: | ^8.2 |
| License: | MPL-2.0 |
| Last Updated: | Jan 2, 2026 |
| Links: | GitHub · Packagist |
Maintainer: brokeyourbike
uid-keys
A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.
Installation
composer require brokeyourbike/uid-keys
Usage
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;
}
Inspiration
Code mainly stolen from the goldspecdigital/laravel-eloquent-uuid package.
Authors
- Ivan Stasiuk | Twitter | LinkedIn | stasi.uk
License
Related Packages
goldspecdigital/laravel-eloquent-uuid
A simple drop-in solution for providing UUID support for the IDs of your Eloquen...
1,389,041
506
gbuckingham89/eloquent-uuid
A simple package for using UUID's (UUID4) with Laravel's Eloquent.
4,803
1
cline/strongly-typed-id
Strongly-typed ID value objects for PHP with support for UUID, ULID, NanoID, GUI...
10,237
0
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 0.2.0 | ^8.2 | ^10.0| | MPL-2.0 | |
| 0.1.2 | ^8.1 | ^8.0| | MPL-2.0 | |
| 0.1.1 | ^8.1 | ^8.0| | MPL-2.0 | |
| 0.1.0 | ^8.1 | ^8.0| | MPL-2.0 |