This is consuming the last 2 days of my life. Locally everything is working fine but when my code is deployed to Heroku, Laravel can’t find the index
view. It’s my understanding this is some caching issue, so I have tried most of Artisan’s commands to clean the cache:
JavaScript
x
php artisan config:cache
php artisan route:cache
php artisan view:clear
php artisan clear-compiled
This is my route, I’m serving a SPA:
JavaScript
Route::get('/{any}', 'HomeController@main')->where('any', '.*');
And this is the stack trace on my view:
I have cleaned the bootstrap/cache
folder and honestly I’m out of ideas. Does someone have a light on this one? Thanks
Advertisement
Answer
Please use the all around cache clearing command :
JavaScript
php artisan optimize:clear