LaravelPackages.net
Acme Inc.
Toggle sidebar
brokeyourbike/uid-keys

A simple drop-in solution for providing UUID and ULID support for the IDs of your Eloquent models.

1.578
0
0.2.0
About brokeyourbike/uid-keys

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

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

Comments