I'm not totally sure if I get what you mean but you could try eager loading (as long as your providers have relationships defined to the other models):
$providers = Provider::with('countries', 'states', 'cities')->get();
Or do you absolutely need the columns to be named cname, sname etc?
Thanks, i'll try your code. I need a row of provider table and plus the column 'name' of the table city, state and country. cname, sname and ciname are alias for to have a unique name for each column, beacuse i already have a column named 'name' in provider table.
What exactly are doing the code you post over there? Returning one row or set of them?
Thanks!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community