Answer the question
In order to leave comments, you need to log in
How to get fields with the same name but in different tables when executing a join query?
There are 2 tables
booking_restaurants
: id, id_restaurant, type
restaurant: id, name, type
DB::table('booking_restaurants')
->join('restaurants', 'booking_restaurants.id_restaurant', '=', 'restaurants.id')
->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question