After the Laravel project finishes deploying to the server, the database import succeeds
Background Login Error:
Google a bit, found a lot of the same problem, looked at, there is a very interesting:
I need a smiley face to describe my mood now, clear artisan cache, clear composer cache, dump AutoLoad, empty browser Cahe--still nothing. It was still nothing to make such a big list.
OK, the first time to hold a very happy mood to adjust the Bug.
Keep looking, look for ... Hey, I found it.
It turns out that Laravel's App_key (. env file) and the Encrypt () function encrypt the problem.
Once the PHP artisan key: Generate regenerated App_key, the Desrypt () function decrypts the MAC is invalid exception, this is due to the App_key change causes the computer MAC information has changed and decrypt () decryption has reported an exception.
Workaround:
Method 1, re-use Encrypt () to encrypt, background re-login, OK.
Method 2, indeed, feel that this encryption method is not conducive to project migration and deployment, to adopt this blog post recommendations, temporarily using hash encryption.
Laravel Project Login Error: The MAC is invalid.