1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:34:04 +00:00

Add UniqueIdentifierGenerators

This commit is contained in:
Samuel Štancl 2019-08-21 20:17:55 +02:00
parent 787063ed73
commit 495bb7d541
5 changed files with 48 additions and 3 deletions

13
src/UUIDGenerator.php Normal file
View file

@ -0,0 +1,13 @@
<?php
namespace Stancl\Tenancy;
use Stancl\Tenancy\Interfaces\UniqueIdentifierGenerator;
class UUIDGenerator implements UniqueIdentifierGenerator
{
public static function handle(string $domain, array $data = []): string
{
return (string) \Webpatser\Uuid\Uuid::generate(1, $domain);
}
}