Home > Mobile >  View not found error after deploying Laravel app on Heroku
View not found error after deploying Laravel app on Heroku

Time:02-23

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:

  1. Removed cache files from storage/framework/views
  2. php artisan view:clear
  3. php artisan route:cache
  4. php artisan config:cache
  5. 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
  • Related