The error occurs “this page isn’t working http error 500 laravel on live or localhost server”; Simply turn on error log debug in Laravel from .env and check error in stroage/logs directory of Laravel then fix it.
Here are two solutions for the error this page isn t working http error 500 laravel on live or localhost:
Solution 1 – Edit .evn File
Open, .env file and update the following lines of code:
APP_ENV=local APP_DEBUG=true
Then again run your laravel app on browser and debug the error.
If you are still facing problems then you should see a second solution.
Solution 2 – Clear Cache of Laravel App
Run the following commands to clear your laravel app cache like session cache, cookies cache:
php artisan cache:clear
And also run the below command and clear your config cache :
php artisan config:cache
If you execute the above-given command. And shows you any of the following issues on your terminal:
- Fatal error: Uncaught ReflectionException: Class config does not exist
- Class config does not exist in vendor/laravel/framework/src illuminatecontainercontainer php 767
- uncaught reflectionexception: class config does not exist laravel
- in container php line 788 class config does not exist
- vendor/laravel/framework/src/illuminatecontainercontainer php on line 738
So now you need to visit your Laravel app directory and then visit to bootstrap/cache directory. And delete all files and sub-directories inside the bootstrap/cache directory.
Or, you can execute the following on the terminal instead of manually deleting the file:
cd bootstrap/cache/ rm -rf *.php