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