Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leewp14/d392147c403aab644de82b404d40fb63 to your computer and use it in GitHub Desktop.
Save leewp14/d392147c403aab644de82b404d40fb63 to your computer and use it in GitHub Desktop.
Just wanna share a little finding about this, since there's no mention of this on the internet. Hopefully this GitHub Gist is useful to some people.
So basically, if you're using Livewire and wire:click events lead to a session expired (error 419 with exception CSRF Token Mismatch), please double check your URL domain.
This has been repeatedly mentioned on various sites, including one of the user on Reddit. Therefore, I did this:
I'm accessing on 127.0.0.1:9090 - CSRF Token Mismatch. No matter httponly, session database/file/cookie, php artisan optimize, blablabla. Nothing works.
After 4 hours of non stop brain-torturing, I decided to access on localhost:9090 - BOOM! Working!!!
BOOMMMMMM!!!!!!
WTF. 我tmd,气死人啊喂!人家赶功课啊!!
Of course, do make sure all your other configuration is correct.
Happy coding. Have a nice day!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment