@sephter did you tried php artisan clear-compile command?
TokenMismatchException in compiled.php line 2440:
Hi everyone
First, sorry for bad english, i sometimes speak english like a spanish cow.
I'm learning php and laravel and have a little problem. I added a scriptwall (for facebook-like functionalities) . I see it (the messages loading is working) but when i'm trying to save a new message (wich sould add a new entry in the database) i receive this message:
Whoops, looks like something went wrong.
1/1
TokenMismatchException in compiled.php line 2440:
in compiled.php line 2440
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17
at VerifyCsrfToken->handle(object(Request), object(Closure)) in compiled.php line 8944
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12083
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in compiled.php line 8944
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 10785
at StartSession->handle(object(Request), object(Closure)) in compiled.php line 8944
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11789
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in compiled.php line 8944
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11738
at EncryptCookies->handle(object(Request), object(Closure)) in compiled.php line 8944
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2478
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 8944
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 8935
at Pipeline->then(object(Closure)) in compiled.php line 1891
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 1880
at Kernel->handle(object(Request)) in index.php line 53
The script is in ./wall (because it is an external resource) and the article.blade contains:
<?php include(app_path().'/../wall/index.php'); ?>
I think this problem is linked to laravel because the wall is working fine when not in laravel repository. Does anyone have a suggestion about how to fix that? Thanks by advance
You probably miss this in your form
<input type="hidden" name="_token" value="{{ csrf_token() }}">
This is Laravel specific!
Please or to participate in this conversation.