protected function getScopeConstraints(Model $model)
    {
        $builder = $model->newQueryWithoutScopes();

        $this->apply($builder, $model);

        return (array) $builder->getQuery()->wheres;
    }
protected function getScopeConstraints(Model $model)
    {
        $builder = $model->newQueryWithoutScopes();

        $this->apply($builder, $model);

        return (array) $builder->getQuery()->wheres;
    }
protected function getScopeConstraints ( Model $ model ) { $ builder = $ model -> newQueryWithoutScopes ( ) ; $ this -> apply ( $ builder , $ model ) ; return ( array ) $ builder -> getQuery ( ) -> wheres ; }
Get an array of the constraints applied by the scope.

@param  \Illuminate\Database\Eloquent\Model $model
@return array
Get an array of the constraints applied by the scope .