mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:34:03 +00:00
Fix Travis, add docs for generating HTTPS certificates (#19)
This commit is contained in:
parent
0adbfee86e
commit
6bb18a2b95
8 changed files with 108 additions and 7 deletions
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Stancl\Tenancy;
|
||||
|
||||
use Stancl\Tenancy\BootstrapsTenancy;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Stancl\Tenancy\Interfaces\StorageDriver;
|
||||
use Stancl\Tenancy\Traits\BootstrapsTenancy;
|
||||
|
||||
class TenantManager
|
||||
{
|
||||
|
|
@ -77,7 +77,7 @@ class TenantManager
|
|||
throw new \Exception("Domain $domain is already occupied by tenant $id.");
|
||||
}
|
||||
|
||||
$tenant = $this->storage->createTenant($domain, \Uuid::generate(1, $domain));
|
||||
$tenant = $this->storage->createTenant($domain, \Webpatser\Uuid\Uuid::generate(1, $domain));
|
||||
$this->database->create($this->getDatabaseName($tenant));
|
||||
|
||||
return $tenant;
|
||||
|
|
@ -264,4 +264,19 @@ class TenantManager
|
|||
|
||||
return $this->put($this->put($key, $value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the identified tenant's attribute(s).
|
||||
*
|
||||
* @param string $attribute
|
||||
* @return mixed
|
||||
*/
|
||||
public function __invoke($attribute)
|
||||
{
|
||||
if (is_null($attribute)) {
|
||||
return $this->tenant;
|
||||
}
|
||||
|
||||
return $this->tenant[(string) $attribute];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue