Skip to content
Advertisement

How to get “city” field from Clients table in laravel query properly?

JavaScript

the query above doesn’t get any result, otherwise if i replace ($request->id) with ‘casablanca’ (the city) in mysql phpMyAdmin I get the result

JavaScript

I use Jquery & Ajax to get the data

JavaScript

Advertisement

Answer

you need to get city name from Client model. as you are using get() that gives you a collection and your next query is not working. So do it like

JavaScript

and then get the domains related to the city

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement