Instead of adding such a method to controller, you should add filtering method to the model, so called scope: http://laravel.com/docs/4.2/eloquent#query-scopes
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community