mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:14:04 +00:00
Fix #998, centralize config used by BelongsToTenant and HasDomains
This commit is contained in:
parent
942d79cbd7
commit
dd0f03f742
14 changed files with 41 additions and 32 deletions
|
|
@ -14,12 +14,12 @@ trait BelongsToTenant
|
|||
{
|
||||
public function tenant()
|
||||
{
|
||||
return $this->belongsTo(config('tenancy.tenant_model'), static::tenantIdColumn());
|
||||
return $this->belongsTo(config('tenancy.models.tenant'), static::tenantIdColumn());
|
||||
}
|
||||
|
||||
public static function tenantIdColumn(): string
|
||||
{
|
||||
return config('tenancy.single_db.tenant_id_column');
|
||||
return config('tenancy.models.tenant_key_column');
|
||||
}
|
||||
|
||||
public static function bootBelongsToTenant(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue