1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-14 01:44:03 +00:00

DB driver ensureTenantCanBeCreated

This commit is contained in:
Samuel Štancl 2019-09-15 11:50:19 +02:00
parent 553e4c381b
commit 5fb11dfc9f
5 changed files with 74 additions and 4 deletions

View file

@ -10,6 +10,7 @@ use Stancl\Tenancy\Contracts\StorageDriver;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
use Stancl\Tenancy\Tenant;
// todo transactions instead of pipelines?
class RedisStorageDriver implements StorageDriver
{
// todo json encoding?
@ -114,7 +115,6 @@ class RedisStorageDriver implements StorageDriver
public function all(array $ids = []): array
{
// todo $this->redis->pipeline() - return?
// todo transaction instead of pipeline?
$hashes = array_map(function ($hash) {
return "tenants:{$hash}";
}, $ids);