Migrated to UUID v4

This commit is contained in:
Constantin Graf
2024-05-07 15:43:00 +02:00
parent d5bbba2c2f
commit ba335b4f05
11 changed files with 30 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace App\Models\Concerns;
use Ramsey\Uuid\Uuid;
trait HasUuids
{
use \Illuminate\Database\Eloquent\Concerns\HasUuids;
/**
* Generate a new UUID for the model.
*/
public function newUniqueId(): string
{
return (string) Uuid::uuid4();
}
}