php - Laravel portal working perfectly on Local and Another Server too but not on mine

I've a Laravel portal which I exported from another server and working perfectly on my localhost but when I tried to move it into another server the pages are working fine but whenever I'm trying to submit a form it is showing 419 | Page Expired Error and I've already added @csrf in my form and one more thing when I trying to directly access the admin page the page also not showing the session message (access denied) and invalid details message. It just blink with a message Redirecting to my-home-page-link. Can anybody help me with this.

I've tried to clear routes of my portal but nothing is working.

Answer

Solution:

Please make sure you have @csrf or {{ csrf_field() }} in your form.

The Session Expired or 419 Page Expired error message in Laravel comes up because somewhere your csrf token verification fails which means the App\Http\Middleware\VerifyCsrfToken::class middleware is already turned on. In the form the @csrf blade directive is already added, which should be fine as well.

Source