0

Im trying to login to my page, but i always get 419 Sorry, your session has expired. Please refresh and try again.

i have search everywhere and the most answer i saw is token error. just under form i add @csrf

<form id="signup" role="form" method="POST" action="{{ url('/admin/login') }}">
@csrf <!-- {{ csrf_field() }} -->

And clear everything in session. But still I get this error.

On my localhost it works.

in session.php i have :

'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', false),

Any suggestion what I can do.

UPPDATE: I add ob_start(); in top of /public/index.php and everything works. Thanks for the help.

Niklas
  • 543
  • 2
  • 8
  • 17
  • Does this answer your question? [Post request in Laravel - Error - 419 Sorry, your session/ 419 your page has expired](https://stackoverflow.com/questions/52583886/post-request-in-laravel-error-419-sorry-your-session-419-your-page-has-exp) – steven7mwesigwa Nov 27 '22 at 08:15

1 Answers1

0

have you tried remove view caches ?!

just run php artisan view:clear

I think this would solve your problem.