I have a form on the localhost page: 8000 / package that is sent to the url localhost: 8000 / book using the post method, everything works perfect, but if in the address bar I type localhost: 8000 / book and I give enter throws me the following error
MethodNotAllowedException
at RouteCollection->methodNotAllowed(array('POST'))in RouteCollection.php (line 238)
I think it's because when I sent the form the parameters for the route localhost: 8000 / book are sent by post, and when I want to enter the URL directly as there are no parameters that are sent, I mark that error.
How can I validate the route saying that if there is no $ request or parameters, I redirect to another url? This as a way to protect the url and not allow users to enter this.