Skip to content
Advertisement

Laravel submitting form gets page expired

So i have a very basic controller located at : app/Http/Controllers/RentalRequestController

JavaScript

Then in my web.php i have the following:

JavaScript

And then i have the following form in my view:

JavaScript

Now when i submit the form it redirects me to a page saying:

JavaScript

Can anyone tell me what ive done wrong?

Advertisement

Answer

You should add:

JavaScript

inside <form> element for example like this:

JavaScript

This is called CSRF protection

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