Skip to content
Advertisement

Laravel Redirecting to a route is not working?

I am new to Laravel, when I am using redirect()->route(‘route_name’) after saving data, it does not work.

Here is my controller function:

JavaScript

Here are my routes :

JavaScript

Any help will be appreciated.

Advertisement

Answer

You need to add the return keyword

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