Answers for "combine 2 columns search query laravel"

PHP
0

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'));
}
Posted by: Guest on April-16-2021

Code answers related to "combine 2 columns search query laravel"

Browse Popular Code Answers by Language