1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 08:44:04 +00:00
tenancy/src/UniqueIdentifierGenerators/UUIDGenerator.php
Samuel Štancl 63da15f7ba
Add UUIDv7Generator
Also correct docblock for ULIDGenerator and add missing @see
annotations in the config file.
2025-11-04 00:54:46 +01:00

20 lines
433 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy\UniqueIdentifierGenerators;
use Illuminate\Database\Eloquent\Model;
use Ramsey\Uuid\Uuid;
use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
/**
* Generates a UUIDv4 for the tenant key.
*/
class UUIDGenerator implements UniqueIdentifierGenerator
{
public static function generate(Model $model): string|int
{
return Uuid::uuid4()->toString();
}
}