mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 02:54:05 +00:00
Merge branch '1.x' of github.com:stancl/tenancy into 1.x
This commit is contained in:
commit
08148225eb
2 changed files with 3 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ class CreateTenantsTable extends Migration
|
||||||
|
|
||||||
// your indexed columns go here
|
// your indexed columns go here
|
||||||
|
|
||||||
$table->json('data')->default('{}');
|
$table->json('data');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,11 +86,10 @@ class RedisStorageDriver implements StorageDriver
|
||||||
|
|
||||||
if (config('database.redis.client') === 'phpredis') {
|
if (config('database.redis.client') === 'phpredis') {
|
||||||
$redis_prefix = $this->redis->getOption($this->redis->client()::OPT_PREFIX) ?? $redis_prefix;
|
$redis_prefix = $this->redis->getOption($this->redis->client()::OPT_PREFIX) ?? $redis_prefix;
|
||||||
$all_keys = $this->redis->scan(null, $redis_prefix . 'tenants:*');
|
|
||||||
} else {
|
|
||||||
$all_keys = $this->redis->scan(null, 'MATCH', $redis_prefix . 'tenants:*')[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$all_keys = $this->redis->keys('tenants:*');
|
||||||
|
|
||||||
$hashes = \array_map(function ($key) use ($redis_prefix) {
|
$hashes = \array_map(function ($key) use ($redis_prefix) {
|
||||||
// Left strip $redis_prefix from $key
|
// Left strip $redis_prefix from $key
|
||||||
return \substr($key, \strlen($redis_prefix));
|
return \substr($key, \strlen($redis_prefix));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue