mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:54:03 +00:00
remove getResourceTenantModelName method and use config
This commit is contained in:
parent
b25071323f
commit
f99a8222c9
2 changed files with 4 additions and 20 deletions
|
|
@ -27,7 +27,9 @@ use Stancl\Tenancy\Tests\Etc\Tenant;
|
|||
beforeEach(function () {
|
||||
config(['tenancy.bootstrappers' => [
|
||||
DatabaseTenancyBootstrapper::class,
|
||||
]]);
|
||||
],
|
||||
'tenancy.tenant_model' => ResourceTenantUsingPolymorphic::class,
|
||||
]);
|
||||
|
||||
Event::listen(TenantCreated::class, JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) {
|
||||
return $event->tenant;
|
||||
|
|
@ -203,12 +205,6 @@ class CentralUserUsingPolymorphic extends Model implements SyncMaster
|
|||
|
||||
public $table = 'users';
|
||||
|
||||
// override method to provide different tenant
|
||||
public function getResourceTenantModelName(): string
|
||||
{
|
||||
return ResourceTenantUsingPolymorphic::class;
|
||||
}
|
||||
|
||||
public function getTenantModelName(): string
|
||||
{
|
||||
return TenantUserUsingPolymorphic::class;
|
||||
|
|
@ -286,12 +282,6 @@ class CentralCompanyUsingPolymorphic extends Model implements SyncMaster
|
|||
|
||||
public $table = 'companies';
|
||||
|
||||
// override method to provide different tenant
|
||||
public function getResourceTenantModelName(): string
|
||||
{
|
||||
return ResourceTenantUsingPolymorphic::class;
|
||||
}
|
||||
|
||||
public function getTenantModelName(): string
|
||||
{
|
||||
return TenantCompanyUsingPolymorphic::class;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue