I am really sorry that I bother you again with my question, but this time I am asking about a kind of best practice. I found already various articles/posts about the topic and followed this article: https://makitweb.com/auto-populate-dropdown-with-jquery-ajax-in-laravel/ how to fill a second select based on the choice of a first select. As far as I can see, I have to use javascript and create new route.
My question would be is a new route the best idea because I also can also just call it by itself in the URL bar, eg. URL /getEmployees/1
How can I archive that I still get the required information but at the same time avoid that the URL can be used. Do I have to fetch all required data in the controller itself before I return the view and then filter them?
Thanks
Stephan
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire