Skip to content
Advertisement

My laravel application is not picking right route

My laravel application should move to route “mango/public/4” but it moves to “mango/public/4/4”. Route file

JavaScript

Update(view)

JavaScript

LaptopController

JavaScript

Advertisement

Answer

You can do it easy if you name your route When your action is just an id for example action="4", it means that form will be sent to relative path, and that’s why you have /4/4 in your url

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