mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-16 02:24:02 +00:00
15 lines
323 B
PHP
15 lines
323 B
PHP
<?php
|
|
|
|
namespace Stancl\Tenancy\Database\Concerns;
|
|
|
|
use Stancl\Tenancy\Database\ParentModelScope;
|
|
|
|
trait BelongsToPrimaryModel
|
|
{
|
|
abstract public function getRelationshipToPrimaryModel(): string;
|
|
|
|
public static function bootBelongsToPrimaryModel()
|
|
{
|
|
static::addGlobalScope(new ParentModelScope);
|
|
}
|
|
}
|