mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:44:02 +00:00
ID generation
This commit is contained in:
parent
958651099a
commit
445b2650cf
3 changed files with 24 additions and 13 deletions
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy;
|
||||
|
||||
use Stancl\Tenancy\Interfaces\UniqueIdentifierGenerator;
|
||||
use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
|
||||
|
||||
class UUIDGenerator implements UniqueIdentifierGenerator
|
||||
{
|
||||
public static function handle(string $domain, array $data = []): string
|
||||
public static function handle(array $domains, array $data = []): string
|
||||
{
|
||||
return (string) \Webpatser\Uuid\Uuid::generate(1, $domain);
|
||||
return (string) \Webpatser\Uuid\Uuid::generate(1, $domains[0] ?? '');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue