devkylian/laravel-uuid is a Laravel package for eloquent uuid trait for laravel 6 and above..
It currently has 0 GitHub stars and 118 downloads on Packagist.
Install it with composer require devkylian/laravel-uuid.
Discover more Laravel packages by devkylian
or browse all Laravel packages to compare alternatives.
Last updated
Eloquent UUID Trait for Laravel 6 and above.
composer require devkylian/laravel-uuid
Schema::create('users', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('username');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use DevKylian\Uuid\HasUuid;
class User extends Model
{
use HasUuid;
}