Take a look at: http://laravel.com/docs/eloquent#query-scopes. I think it will help you to achieve the necessary result.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community