App works fine on local server but on heroku it gives following error
InvalidArgumentException:
View [index] not found.
Route is set as:
Route::get('/', function () {
return view('index');
});
index.blade.php also exists in views folder
I have tried following:
- Removed cache files from storage/framework/views
- php artisan view:clear
- php artisan route:cache
- php artisan config:cache
- php artisan key:generate
Any help please?
CodePudding user response:
you already done php artisan config:cache
or php artisan config:clear
Did you name your view correctly as yourview.blade.php?
Did you place the view correctly in resources\views
CodePudding user response:
You can save yourself time clearing caches by writing this one command any time you're having doubts:
php artisan optimize:clear