I have some related MySQL tables, and I want to obtain the columns in all of them, but if I try with something like this code from the manual, I only get the columns from the first table:
$users = DB::table('users')
->join('contacts', 'users.id', '=', 'contacts.user_id')
->join('orders', 'users.id', '=', 'orders.user_id')
->select('users.*', 'contacts.phone', 'orders.price')
->get();
That would be all columns from 'users' table, but I do not see contacts and orders columns.