skip to Main Content

I have developed a web site using laravel 5.4. in localhost its works fine.

after i uploaded it into cpanel shared host. its keep getting the

(1/1) TokenMismatchException
in VerifyCsrfToken.php (line 68)
Error when i tried to login to the web site

2

Answers


  1. Chosen as BEST ANSWER

    I didn't had SSH access on the host. So i tried run those command in my computer CMD then upload the project but i failed. Finally i create a another laravel project with the same version of my previous project. Then i copy and paste all the i have created such as controllers, views, request, model, helpers, web.php file and run command Auth and dumpautoload then upload the newly create project to the host. I also feel like its not the best way to do it. But its work for me.


  2. First of all use in login form (in html view):

    {{ csrf_field() }}
    

    Next try to generate by artisan new app key:

    php artisan key:generate
    

    After that restart your config file by:

    php artisan config:cache
    

    Did that helped?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search