Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

multiple logical condition in laravel query

// ...
$q->where(function ($query) {
    $query->where('gender', 'Male')
        ->where('age', '>=', 18);
})->orWhere(function($query) {
    $query->where('gender', 'Female')
        ->where('age', '>=', 65);	
})
Source by laraveldaily.com #
 
PREVIOUS NEXT
Tagged: #multiple #logical #condition #laravel #query
ADD COMMENT
Topic
Name
3+8 =