vendredi 6 janvier 2017

TokenMismatchException in Laravel 5.3 form

I feel ashamed asking this question as it has been asked many times by other people, however I cannot find any solution for myself.

I am using Laravel 5.3 and I created a simple form according to documentation and other stackoverflow topics.

Everything works fine in my local machine. After putting my project on server this error keeps showing up after I submit the form:

TokenMismatchException in VerifyCsrfToken.php line 68:

Added CSRF token in head section:

<head>
<meta name="csrf-token" content="" />
</head>

Form also contains csrf:

 <form method="POST" action="/save_new_order">
       
       <input type="text" name="web_name"> 
       <textarea cols="30" rows="15" name="web_description"></textarea>                  
       <input type="email" name="web_email"> 
       <input type="submit" id="submitButton" value="WYŚLIJ" name="submit">
    </form>

I also tried using:

<input type="hidden" name="_token" value=""> 

instead of:



Tokens are being saved in storage/framework/sessions/ everytime I use the form.

Please help me on this, I am working for over 15 hours and nothing so far.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2iZZaC8
via IFTTT

Aucun commentaire:

Enregistrer un commentaire