Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel orWhere

$camps = $field->camps()->where('status', 0)->where(function ($q) {
    $q->where('sex', Auth::user()->sex)->orWhere('sex', 0);
})->get();
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #laravel #orWhere
ADD COMMENT
Topic
Name
8+8 =