1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 09:34:04 +00:00
tenancy/src/UUIDGenerator.php
2024-03-12 17:29:00 +01:00

19 lines
393 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
use Illuminate\Database\Eloquent\Model;
use Ramsey\Uuid\Uuid;
use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
// todo@move move to separate namespace
class UUIDGenerator implements UniqueIdentifierGenerator
{
public static function generate(Model $model): string
{
return Uuid::uuid4()->toString();
}
}