I have 2 tables I want to join.
table: users table: orders
users and orders have a column called 'id'
I need to find all the orders with status 3 for users that have rep_id = 112:
select * from `orders`
inner join `users` on `orders`.`user_id` = `users`.`id`
where `status` = 3
and `rep_id` = 112
The problem is, the result I'm getting puts the users.id in the id column and in user_id (From orders table) column.
I need the orders.id not the users.id to be in the id column in the results.
Should I just not use Eloquent for that?