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

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

        return (array) $builder->getQuery()->wheres;
    }