src/TenantManager.php
/**
     * Applies applicable tenant scopes to a model.
     *
     * @param Model|BelongsToTenants $model
     */
Applies applicable tenant scopes to a model.
Applies applicable tenant scopes to a model .
public function applyTenantScopes(Model $model)
    {
        if ($this->getTenant()) {
            return $model->addGlobalScope($this->getScope());
        }
        $this->deferredModels->put(get_class($model), [$model, $this->getScope()]);
    }
public function applyTenantScopes ( Model $ model ) { if ( $ this -> getTenant ( ) ) { return $ model -> addGlobalScope ( $ this -> getScope ( ) ) ; } $ this -> deferredModels -> put ( get_class ( $ model ) , [ $ model , $ this -> getScope ( ) ] ) ; }
Applies applicable tenant scopes to a model.
Applies applicable tenant scopes to a model .
// Else, defer to a later stage