Search
 
SCRIPT & CODE EXAMPLE
 

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();   
  }
Comment

PREVIOUS NEXT
Code Example
Php :: check the request type in laravel 
Php :: create custom header in wordpress 
Php :: gettype() function in PHP 
Php :: laravel app running in console 
Php :: wc create new category 
Php :: laravel local scope 
Php :: php domdocument list all elements 
Php :: php strlen 
Php :: laravel get data in pivot table 
Php :: php move element to beginning of array 
Php :: file put contents php 
Php :: laravel factory relations data 
Php :: author page url from the current post 
Php :: $loop laravel list 
Php :: laravel number input positive only 
Php :: the uploaded file exceeds the upload_max_filesize directive in php.ini. wordpress 
Php :: job with queue name in laravel 
Php :: Undefined constant "STDOUT" in php 
Php :: php get current page url 
Php :: switch php version ubuntu 20.04 
Php :: php http method 
Php :: rewrite url to exclude php extension 
Php :: laravel modules 
Php :: php function 
Php :: googlee traduction 
Php :: php get variable by string name 
Php :: PHP trim — Strip whitespace (or other characters) from the beginning and end of a string 
Php :: laravel count array 
Php :: alert message in blade template with() 
Php :: link to internal pages in wp php 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =