Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how condition for multiple row by orwhere laravel

if ($request->search) {
             
     $users = User::where('type', '=',  'Customer')
        ->where(function ($query) use ($request) {
            $query->where('name', "like", "%" . $request->search . "%");
            $query->orWhere('mobile', "like", "%" . $request->search . "%");
        })->get();   
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #condition #multiple #row #orwhere #laravel
ADD COMMENT
Topic
Name
8+3 =