src/Database/Queries/AbilitiesForModel.php
public function constrain($query, $model, $strict = false)
    {
        if ($model === '*') {
            return $this->constrainByWildcard($query);
        }

        $model = is_string($model) ? new $model : $model;

        $this->constrainByModel($query, $model, $strict);
    }
public function constrain($query, $model, $strict = false)
    {
        if ($model === '*') {
            return $this->constrainByWildcard($query);
        }

        $model = is_string($model) ? new $model : $model;

        $this->constrainByModel($query, $model, $strict);
    }
public function constrain ( $ query , $ model , $ strict = false ) { if ( $ model === '*' ) { return $ this -> constrainByWildcard ( $ query ) ; } $ model = is_string ( $ model ) ? new $ model : $ model ; $ this -> constrainByModel ( $ query , $ model , $ strict ) ; }
Constrain a query to an ability for a specific model or wildcard.

@param  \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder  $query
@param  \Illuminate\Database\Eloquent\Model|string  $model
@param  bool  $strict
@return void
Constrain a query to an ability for a specific model or wildcard .