InfyOmLabs/generator-builder

Criteria does not work without a get parameter.

dexterpedro opened this issue · 0 comments

I have the following criteria:
public function apply( $model , RepositoryInterface $repository )
{
if ( !Auth::user()->can( 'view_all_customers' ) ) {
$model->where( 'customer_id' , 'IN',Auth::user()->customersArr() );
}

    return $model;
}

This is correct, why does it work when I pass the orgerBy parameter in the url. but when I do not pass, it simply ignores my criteria.
Does anyone know what can it be?