composer require zitech/laravel-auditable-uuid
php artisan vendor:publish
set ziAuditable.php set 'useUuid' => true,
Schema::create('users', function (Blueprint $table) {
$table->uuid('id');
$table->string('name', 100);
$table->auditable();
$table->primary('id');
$table->timestamps();
});
drop migrations
Schema::create('users', function (Blueprint $table) {
$table->dropAuditable();
});
on User model
namespace App;
use Zitech\LaravelAuditableUuid\AuditableTrait;
class User extends Model
{
use AuditableTrait;
public $incrementing = false;
...................
}
*** Note ***