In Eloquent Query Builder, you can specify "as" to return any column with a different name, just like in plain SQL query.
1$users = DB::table('users')->select('name', 'email as user_email')->get();
In Eloquent Query Builder, you can specify "as" to return any column with a different name, just like in plain SQL query.
1$users = DB::table('users')->select('name', 'email as user_email')->get();