xzxzyzyz/laravel-uuid-model
Laravel Uuid Model
Using uuid in eloquent model.
Installation
composer require xzxzyzyz/laravel-uuid-model
Usage
Create primary key as string type.
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('example', function(Blueprint $table) {
$table->uuid('id')->primary();
// ...
});
}
And, Extends Xzxzyzyz\Laravel\Uuid\Model in your model.
use Xzxzyzyz\Laravel\Uuid\Model;
class Example extends Model
{
//...
}
Related Packages
moharrum/laravel-eloquent-extras
Set of extra and useful Eloquent helpers to speed up development.
65
0
dyrynda/laravel-model-uuid
This package allows you to easily work with UUIDs in your Laravel models.
3,284,319
484
stevenmaguire/laravel-uuid-model
Create non-incrementing Laravel models whose primary key is a UUID
46
4