mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 03:54:02 +00:00
fix tenant() relationship in Domain
This commit is contained in:
parent
a7ad8287e6
commit
82fa6cb292
1 changed files with 2 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ use Stancl\Tenancy\Contracts;
|
||||||
use Stancl\Tenancy\Contracts\Tenant;
|
use Stancl\Tenancy\Contracts\Tenant;
|
||||||
use Stancl\Tenancy\Database\Concerns;
|
use Stancl\Tenancy\Database\Concerns;
|
||||||
use Stancl\Tenancy\Events;
|
use Stancl\Tenancy\Events;
|
||||||
|
use Stancl\Tenancy\Tenancy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property string $domain
|
* @property string $domain
|
||||||
|
|
@ -28,7 +29,7 @@ class Domain extends Model implements Contracts\Domain
|
||||||
|
|
||||||
public function tenant(): BelongsTo
|
public function tenant(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(config('tenancy.models.tenant'));
|
return $this->belongsTo(config('tenancy.models.tenant'), Tenancy::tenantKeyColumn());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected $dispatchesEvents = [
|
protected $dispatchesEvents = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue