Closed pieinn closed 6 years ago
That's because the form components expect the response to be in a JSON format. As stated here, you can control the handling after the form was processed by the server by specifying specific keys in the JSON response. If you want to redirect the user after the form was processed you need to return the following JSON data with the key redirect
and your redirect url as the value in your controller method:
return response()->json([
'redirect' => route('home')
]);
Thank you, I understood how it works!
But redirect to back, not to my home page:
`return response()->json([
'redirect' => route('home')
]);`
Sorry, I'm newbie...
All works thank you!
In my controller i have function redirect to . ... but when i use not redirect?
Please advice how to resolve this issue.
Thanks!