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