mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 18:04:04 +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);
|
|
}
|
|
}
|