Skip to content
Advertisement

Dependent Dropdown doesn’t display using AJAX in Laravel 6.0

I m trying to do some dependent dropdown that shows me information from the state,streets and parishes from other countries , but the dropdown only shows the states not the other things, i would like to know what is that happening and how can i solve it

  • Below i will let the code of my dropdown, my functions that are in the controller, my routes and my scripts
  • Also there is something that has the name of Lugar that is my model

Code of the functions in Cliente_naturalController

JavaScript

Dropdown code that doesnt work

JavaScript

Routes

JavaScript

Scripts in the view

JavaScript

Advertisement

Answer

I solve it putting my <form>withmethod=POST in the same view of the register that has laravel the resultant view has two forms that use different controllers, also retire this script <script src="{{ asset('js/app.js') }}" defer></script>

*It looks like this *

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