mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 08:44:04 +00:00
Also correct docblock for ULIDGenerator and add missing @see annotations in the config file.
20 lines
433 B
PHP
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();
|
|
}
|
|
}
|