mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:24:04 +00:00
add storage driver assertion
This commit is contained in:
parent
b07b848a56
commit
70234e1123
5 changed files with 22 additions and 4 deletions
|
|
@ -57,8 +57,8 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->mergeConfigFrom(__DIR__ . '/assets/config.php', 'tenancy');
|
||||
|
||||
$this->app->bind(StorageDriver::class, $this->app['config']['tenancy.storage_driver']);
|
||||
$this->app->bind(TenantModel::class, $this->app['config']['tenancy.tenant_model']);
|
||||
$this->app->bind(StorageDriver::class, $this->app['config']['tenancy.storage_driver']);
|
||||
$this->app->bind(ServerConfigManager::class, $this->app['config']['tenancy.server.manager']);
|
||||
$this->app->singleton(DatabaseManager::class);
|
||||
$this->app->singleton(TenantManager::class, function ($app) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Stancl\Tenancy;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Stancl\Tenancy\Interfaces\TenantModel;
|
||||
|
||||
class Tenant extends Model implements TenantModel
|
||||
{
|
||||
|
|
|
|||
|
|
@ -320,4 +320,9 @@ class TenantManager
|
|||
|
||||
return $this->tenant[(string) $attribute];
|
||||
}
|
||||
|
||||
public function getStorageDriver(): Interfaces\StorageDriver
|
||||
{
|
||||
return $this->storage;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue