Change this: where('productions.opening_date', '<=', DB::raw('curdate()')) To: whereRaw('product...
Take a read on these posts: http://creolab.hr/2013/03/removing-the-public-segment-in-a-laravel-4-ap...
You should create an issue on github project repo for better solution
The Laravel portal for problem solving, knowledge sharing and community building.