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

fix getTenantById

This commit is contained in:
Samuel Štancl 2019-08-10 09:27:16 +02:00
parent 4d7c6b6683
commit 23bdaba81e

View file

@ -31,7 +31,11 @@ class DatabaseStorageDriver implements StorageDriver
*/ */
public function getTenantById(string $uuid, array $fields = []): array public function getTenantById(string $uuid, array $fields = []): array
{ {
if ($fields) {
return $this->tenant->find($uuid)->only($fields); return $this->tenant->find($uuid)->only($fields);
} else {
return $this->tenant->find($uuid)->toArray();
}
} }
public function getTenantIdByDomain(string $domain): ?string public function getTenantIdByDomain(string $domain): ?string