Answers for "mysql concat two columns laravel eloquent"

SQL
1

mysql concat two columns laravel eloquent

public function users()
{
    $users = DB::table('users')->select('id', DB::raw("CONCAT(users.first_name,' ',users.last_name) AS full_name"))->get()->pluck('full_name', 'id');

    return view('users',compact('users'));
}
Posted by: Guest on March-11-2022

Code answers related to "mysql concat two columns laravel eloquent"

Code answers related to "SQL"

Browse Popular Code Answers by Language