I have the following query:
\DB::table('Service_prices')
->join('Services', 'Services.id', 'Service_prices.service_id')
->join('Roles', 'Roles.id', 'Service_prices.id')
->join('Users', 'Users.role_id', 'Roles.id')
->where('Services.id', $service_id)
->select(['Service_prices.id as service_price_id', 'Roles.id as role_id', 'Service_id as service_id'])
->get();
the issue is that all tables has id and I need them all, but, I get same id for all, in other words it appears there is some conflict and one of the ids are overwriting the others. how to solve this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire