1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-14 04:34:02 +00:00
tenancy/src/UUIDGenerator.php

19 lines
388 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 to separate namespace
class UUIDGenerator implements UniqueIdentifierGenerator
{
public static function generate(Model $model): string
{
return Uuid::uuid4()->toString();
}
}