Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shawdow's avatar

TokenMismatchException in VerifyCsrfToken.php (line 68)

Hi,

I am learning Laravel with writting sample programs I got the error when i try to access the laravel server in my mobile

The error that i have got is not displayed in my PC...

I searched with google try with solution

1.changing .env file

2.addding {{ csrf_token() }}

3.modified session.php file

But still it does not works on my mobile facing the same error

Thanks,

0 likes
1 reply
smnhunt's avatar

If you are placing {{ csrf_token() }} inside your form, you should instead try {{ csrf_field() }}.

csrf_token() returns the value of the token.

csrf_field() returns the html for a hidden input that passes the value of the csrf_token() to your app.

1 like

Please or to participate in this conversation.