mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
Unique ID generator 'handle' -> 'generate'
This commit is contained in:
parent
d480ea63da
commit
67bfb20e96
3 changed files with 3 additions and 3 deletions
|
|
@ -13,5 +13,5 @@ interface UniqueIdentifierGenerator
|
|||
* @param array $data
|
||||
* @return string
|
||||
*/
|
||||
public static function handle(array $domains, array $data = []): string;
|
||||
public static function generate(array $domains, array $data = []): string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ class Tenant implements ArrayAccess
|
|||
|
||||
public function generateId()
|
||||
{
|
||||
$this->id = $this->idGenerator->handle($this->domains, $this->data);
|
||||
$this->id = $this->idGenerator->generate($this->domains, $this->data);
|
||||
}
|
||||
|
||||
public function save(): self
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
|
|||
|
||||
class UUIDGenerator implements UniqueIdentifierGenerator
|
||||
{
|
||||
public static function handle(array $domains, array $data = []): string
|
||||
public static function generate(array $domains, array $data = []): string
|
||||
{
|
||||
return (string) \Webpatser\Uuid\Uuid::generate(1, $domains[0] ?? '');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue