1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:04:04 +00:00

[1.8.0] Custom id scheme (#108)

* Add UniqueIdentifierGenerators

* Apply fixes from StyleCI
This commit is contained in:
Samuel Štancl 2019-08-21 20:29:53 +02:00 committed by GitHub
parent 787063ed73
commit f590e2ce2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}
}