laravel 500 Whoops, looks like something went wrong.

reason

Originally, it was installed directly in the virtual machine and programmed with vim, but when modifying the view code, it was not very convenient. I changed it to svn, moved to the local area and edited it; As the svn library name, first modify the original project name xxx_bak, after svn is checked out, then copy the contents of bak to the checkout directory and add it to svn. As a result, the project that was running normally had 500.

I checked it carefully and found that the problem was that there was a problem when copying back the project directory from bak - lost .env

The solution is to:

Report 500, but there are no other detailed errors, add a breakpoint in the index.php entry file, it is normal, it is judged that the debug mode is not enabled

Find 'debug' => env('APP_DEBUG', false) in config/app.php and change it to true,

Running again shows the real error No application encryption key has been specified

Take a closer look, the original .env is gone, copy a copy, but the bak directory has been deleted, so I have to google a copy, and then regenerate the key:

php artisan key:generate

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324610892&siteId=291194637