302 redirect when using Laravel's Form Request Validation #148
Comments
i have the same problem with laravel 5.2 when using form request validation |
Closing this as part of an issue-cleanup. Please re-open if this is still an issue on the latest version. |
I have the same issue, running 5.5.28 |
Yes, agree with @NoelDavies the issue has returned when using Laravel 5.5.28 |
laravel 5.5 laravel will return json when found this header. actual, there are two method return json. |
Same issue persists with me today, @yunmoxue's suggestion to add a header resolved my issue |
Hi |
@lbrevity @amadoutidiane you can add request header when you use xhr. |
An example of adding the header to a jQuery Ajax for @amadoutidiane. Thought I'd share the solution for others here 🙂
|
At least in Laravel 6.0, setting a request header of |
This solves the problem for me: $.ajax({ |
Adding Accept: application/json did not solve it for me |
Whenever I typehint a request validation in controller function like so:
I'll get a 302 response redirect. See JS response below:
But if I replace the
StoreStaffEventLog $request
toRequest $request
. My request works fine and returns me a201 Created
status code.The text was updated successfully, but these errors were encountered: