Support the ongoing development of Laravel.io →
Views Blade

My problem I describe below: I have a "view" location that has the fields name and city. The field name I fill in, but the city field I perform a search in the "searchCity" view. So, when I click the "search" button, through the url I access the table of the "searchCity" view and through the "select" button I choose the city. This action returns to the controller "localeController @ searchCities" which returns to the "location" view of the city id. It turns out that if I fill in the name of the locality before doing the search in "searchCity", when the controller returns the view "Location", the city is filled, but the field name is empty. How can I solve this problem guys? Thank you very much in advance!

Last updated 2 years ago.
0

Hi,

Why don't you just load all cities(in a Controller) before going to the location view and then you show a list of options with the cities the same way o similar than what you have on the citySearch view, you're also making the user to go through one unnecessary step there clicking on a button and then going back to the location view. Make the user feel like the process is going almost unnoticeable.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.