InfyOmLabs / generator-builder

InfyOm Laravel Generator GUI Builder
http://labs.infyom.com/laravelgenerator/
MIT License
133 stars 71 forks source link

Criteria does not work without a get parameter. #26

Closed dexterpedro closed 6 years ago

dexterpedro commented 6 years ago

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?