multiple logical condition in laravel query

Solutions on MaxInterview for multiple logical condition in laravel query by the best coders in the world

showing results for - "multiple logical condition in laravel query"
Luigi
18 Aug 2016
1// ...
2$q->where(function ($query) {
3    $query->where('gender', 'Male')
4        ->where('age', '>=', 18);
5})->orWhere(function($query) {
6    $query->where('gender', 'Female')
7        ->where('age', '>=', 65);	
8})