mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 01:44:03 +00:00
[1.7.0] Add DB storage driver (#82)
This commit is contained in:
parent
674f4b3f9a
commit
9df78eb9c2
13 changed files with 375 additions and 25 deletions
|
|
@ -11,7 +11,7 @@ class RedisStorageDriver implements StorageDriver
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
$this->redis = Redis::connection('tenancy');
|
||||
$this->redis = Redis::connection(config('tenancy.redis.connection', 'tenancy'));
|
||||
}
|
||||
|
||||
public function identifyTenant(string $domain): array
|
||||
|
|
@ -33,8 +33,6 @@ class RedisStorageDriver implements StorageDriver
|
|||
*/
|
||||
public function getTenantById(string $uuid, array $fields = []): array
|
||||
{
|
||||
$fields = (array) $fields;
|
||||
|
||||
if (! $fields) {
|
||||
return $this->redis->hgetall("tenants:$uuid");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue