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

uddin9live's avatar

I want to disable crsf token token

Hello guys pls help me . I don't want to use crsf token as my sharing hosting stop working suddenly it's giving TokenMismatchException error . here is the discussing https://goo.gl/cY8q3R I have removed 'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken' in app/Http/Kernel.php. but laravel auth (login system) does not work . how to disable crsf token and will work laravel auth (laravel login form) work

Thanks in Advance

0 likes
8 replies
kossa's avatar

Hello,

Try in app/Hppt/Kernel.php comment : \App\Http\Middleware\VerifyCsrfToken::class,

uddin9live's avatar

yes i did that . read my question. but laravel auth (login) does not work. what else do i need to do to work laravel auth

bashy's avatar

Looks like it's still using that Middleware

in VerifyCsrfToken.php line 46
at VerifyCsrfToken->handle(object(Request), object(Closure)) in /home4/q9c40988/public_html/paystubsonline.net/laravel/app/Http/Middleware/VerifyCsrfToken.php line 34
1 like
uddin9live's avatar

http://paystubsonline.net/my-paystubs

login uddin9live@gmail.com password helalhq6

after removing middleware code and removed 'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken' in app/Http/Kernel.php.

it's seems login redirect working but some how not going my admin page . i had code in blade if guest go and render login form . just showing loign form agian but login redirect is working .

d3xt3r's avatar
d3xt3r
Best Answer
Level 29

or may be if you don't want to , check where it says

    'domain' => null,

My research says that either you have set it to 'paystubsonlinenet' in which case change it to 'paystubsonline.net', or something is terribly wrong with your server, because your cookies are being set for paystubsonlinenet.

1 like
uddin9live's avatar

Thank you all . it's working now . thanks all of your support

Please or to participate in this conversation.