Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

combine 2 columns search query laravel

public function index()
{
    $users = User::select("*", DB::raw("CONCAT(users.first_name,' ',users.last_name) as full_name"))
        ->get();
  
    return view('home', compact('users'));
}
 
PREVIOUS NEXT
Tagged: #combine #columns #search #query #laravel
ADD COMMENT
Topic
Name
5+5 =