Closed minhchu closed 8 years ago
Thanks but this is actually a known bug and is a duplicate.
Thanks. Can I make a PR because Taylor said that he had never had this issue https://github.com/laravel/framework/pull/11120#issuecomment-161405604
I don't think this is a bug because http does not natively support redirects as POST requests. See; http://programmers.stackexchange.com/questions/99894/why-doesnt-http-have-post-redirect
@GrahamCampbell could you check again
why you let user see the form then? protect your route event with auth
@syaiful6 it's just for UX. It's kind the same as check out a cart. You dont have to login until the payment step.
This is exactly, what anyone would want to have the greater the user experience the greater the usage of an application, otherwise its just like any other website or application in a black hole, in the current world of modernization if User eXperience ( UX ) is not given importance while building the enterprise of end user applications there is no use to even thinking of developing it.
I understand that http does not allow this, but instead, if laravel can come up with this, like for example, when some thing is redirected to login, first store the request object and see what is the current request type be it be POST / PATCH / DELETE and then once the login is successful, while doing a redirect, instead of redirecting why cant it do a request like a POST request or what ever based on the earlier action and details stored.. that will give a great User eXperience ( UX ) as mentioned by @minhchu
And it will be a great attraction for Laravel as well, many developers would love this feature to be part of Laravel Framework as it will save a lot of time in developing these features.
I defined my routes like this:
And I added
auth
middleware in my BookingController's constructor:/booking
. Now it is GET request.I assume that
auth
middleware have to maintain the request after it is passed through. So it must redirect to/booking
with POST method. Please let me know if this is a bug or the way laravel working. I'm using Laravel 5.2.10