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

iforeman's avatar

TokenMismatchException

Hello

i use multi auth on laravel 5.4 and i get this error

My Code

<form action="{{ route('admin.post.login') }}" method="POST">
    <input type="hidden" name="_token" value="{{ csrf_token() }}">
    <div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
        <input type="text" name="email" class="form-control custom-input" placeholder="E-mail">
    </div>
    <div class="form-group {{ $errors->has('password') ? ' has-error' : '' }}">
        <input type="password" name="password" class="form-control custom-input" placeholder="Şifre">
    </div>
    <div class="form-group">
        <button type="submit" class="btn btn-edit pull-right">Giriş Yap</button>
    </div>
</form>

this code works my homestead, but not working on forge

0 likes
6 replies
andreich1980's avatar

Check out the page source, is there a token in the hidden field?

BTW, why don't you use csrf_field() instead of csrf_token()?

iforeman's avatar

I still haven't solved the problem, help me

Please or to participate in this conversation.