laravel app shows white blank page on Artisan cache:clear or config:clear command
My laravel app is working quite well but I noticed the mail config is not using the value from ENV so I ran artisan config:clear. Then, when I reload, the website shows a blank white page. Please as this is urgent.
This are what I have tried so far but still not working:
Check for whitespace in ENV value (found none)
Run artisan config:cache, config:clear, view:clear, route:clear and even clear
Delete cache files in bootstrap cache folder manually
I need help urgently, anyone experienced this before?
This issue could be caused by a variety of factors, but one possible solution is to check the Laravel log files for any errors that may have occurred during the config:clear command. To do this, navigate to the storage/logs directory and open the most recent log file. Look for any error messages that may indicate the cause of the blank white page.
Another possible solution is to try running the composer dump-autoload command to regenerate the autoload files. This can sometimes resolve issues with missing or outdated class files.
If neither of these solutions work, it may be necessary to debug the issue further by checking the server error logs or using a debugging tool like Xdebug.
// Example code for running composer dump-autoload
composer dump-autoload
Thanks for the help, I have been able to solve it.
My website was hosted on a shared hosting and I was running artisan command through route.
Later I was able to use ssh access to run artisan command and turns out that it returns an error which prevent the command from running.
The error was that each time I save and write value to env file, there was a break line between my APPNAME.
Since the artisan command didn't run when I hit the clear route, the cache config does not clear thereby returns the already cached data when trying to send mail.