mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 17:04:03 +00:00
fix getTenantById
This commit is contained in:
parent
4d7c6b6683
commit
23bdaba81e
1 changed files with 5 additions and 1 deletions
|
|
@ -31,7 +31,11 @@ class DatabaseStorageDriver implements StorageDriver
|
|||
*/
|
||||
public function getTenantById(string $uuid, array $fields = []): array
|
||||
{
|
||||
return $this->tenant->find($uuid)->only($fields);
|
||||
if ($fields) {
|
||||
return $this->tenant->find($uuid)->only($fields);
|
||||
} else {
|
||||
return $this->tenant->find($uuid)->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
public function getTenantIdByDomain(string $domain): ?string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue