Add site() to SiteID trait, so site models can be referenced (eg: in email)
This commit is contained in:
parent
2d7437fc0d
commit
69e5a5f12c
@ -7,6 +7,7 @@ namespace App\Traits;
|
|||||||
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
use App\Models\Site;
|
||||||
use App\Models\Scopes\SiteScope;
|
use App\Models\Scopes\SiteScope;
|
||||||
|
|
||||||
trait SiteID
|
trait SiteID
|
||||||
@ -26,4 +27,9 @@ trait SiteID
|
|||||||
|
|
||||||
return parent::save();
|
return parent::save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function site()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Site::class);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user