Skip to content
Advertisement

i want to route from a datatable with action buttons using the url method, but on successful data fetch, buttons routes to 404 page

JavaScript

Please i’ll be online for anything else that i might need to show Please i’ll be online for anything else that i might need to show Please i’ll be online for anything else that i might need to show Please i’ll be online for anything else that i might need to show Please i’ll be online for anything else that i might need to show Please i’ll be online for anything else that i might need to show

Advertisement

Answer

Issue: The route generated by resource routing does not contain a mandatory route parameter name, it was an {} empty which should have been {vendor} like this.

JavaScript

See all {} in URI which was causing a 404 when you generate a route like master/vendor/1/edit to edit resource #1.

The issue was due to trailing slash / in resource routing /master/vendor/. In resource routing the last variable is place inside curly braces to make it a parameter name. But in this case laravel thinks that it is an empty value after slash causing {} this in routes.

Remove trailing slash and the output would be.

JavaScript

Old Solution: Due to mandatory id parameter it is causing route not found. Created routes manually

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