Simple Laravel package that includes a trait for using UUIDs and IDs on Eloquent models
jasonmccallister/laravel-uuid-as-id is a Laravel package for simple laravel package that includes a trait for using uuids and ids on eloquent models.
It currently has 0 GitHub stars and 24 downloads on Packagist (latest version v0.1.0).
Install it with composer require jasonmccallister/laravel-uuid-as-id.
Discover more Laravel packages by jasonmccallister
or browse all Laravel packages to compare alternatives.
Last updated
This is a simple trait that will override the key on an eloquent model to create a UUID instead of an integer.
You can install the package via composer:
composer require jasonmccallister/laravel-uuid-as-id
Update your models to use the trait, and you are done!
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use JasonMcCallister\UuidAsId\Traits\UuidAsId;
class SomeModel extends Model
{
use UuidAsId;
// the rest of your model's code
}
composer test
The MIT License (MIT). Please see License File for more information.