mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 01:44:03 +00:00
Refactor more old code and get tests to pass
This commit is contained in:
parent
c5377a16f7
commit
c32f229dd5
72 changed files with 425 additions and 531 deletions
16
src/Database/Concerns/HasDomains.php
Normal file
16
src/Database/Concerns/HasDomains.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Database\Concerns;
|
||||
|
||||
use Stancl\Tenancy\Contracts\Domain;
|
||||
|
||||
/**
|
||||
* @property-read Domain[] $domains
|
||||
*/
|
||||
trait HasDomains
|
||||
{
|
||||
public function domains()
|
||||
{
|
||||
return $this->hasMany(config('tenancy.domain_model'), 'tenant_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue