New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

brokeyourbike/uid-keys

A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.
1,647
Install
composer require brokeyourbike/uid-keys
Latest Version:0.2.0
PHP:^8.2
Laravel:10 · 11 · 12
Older releases:8 · 9
License:MPL-2.0
Last Updated:Jan 2, 2026
Links: GitHub  ·  Packagist
Maintainer: brokeyourbike

uid-keys

Latest Stable Version Total Downloads codecov

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

License

Mozilla Public License v2.0

Related Packages

goldspecdigital/laravel-eloquent-uuid

A simple drop-in solution for providing UUID support for the IDs of your Eloquen...

1,402,596 505
cline/morphism

Reusable polymorphic key mapping for Laravel packages

23,796 0
gbuckingham89/eloquent-uuid

A simple package for using UUID's (UUID4) with Laravel's Eloquent.

4,894 1
lingfengchencn/eloquent-uuid-for-key

uuid4 key for laravel's eloquent

25 1
stayallive/laravel-eloquent-uuid

Generate UUID for a Laravel Eloquent model attribute.

71,638 4

Version History

Version Released PHP Laravel License
0.2.0 ^8.2 ^10.0|^11.0|^12.0 MPL-2.0
0.1.2 ^8.1 ^8.0|^9.0 MPL-2.0
0.1.1 ^8.1 ^8.0|^9.0 MPL-2.0
0.1.0 ^8.1 ^8.0|^9.0 MPL-2.0