vendredi 14 décembre 2018

'In Container.php Class view does not exist', after running make:migration - Laravel 5.7

I've been trawling for almost two days to find an answer, but no solutions to similar problems have helped to solve mine, so time to ask my own question.

Using Laravel 5.7 on Windows 10. When I run a php artisan make:migration command, or make a model with a migration (make:model -m), it runs fine once; the migration is created. But after that I am unable to run any further php artisan commands. Every time I try I get:

In Container.php line 779:

Class view does not exist

I've since discovered that the same issue also arises when making a seeder. I have noticed that upon running the first command, the bootstrap\cache\services.php file is being removed. Using a backup to replace this file in the directory fixes the problem, allowing me to run php artisan commands again. But the moment I make a migration or a seeder, the file is removed and I encounter the same error.

  • I have tried a composer dump-autoload. If the services.php file is in the directory, it gets removed again and I am shown the error.
  • I have tried composer update and composer install (including after removing the vendor folder)
  • I have tried php artisan config:cache and php artisan config:clear
  • I have checked my .env file for spaces not contained within quotations.
  • I have checked that 'Illuminate\View\ViewServiceProvider::class,' is in my config\app.php file under 'providers'.

Everything seemed to be working fine a week or so ago. I hadn't been running any php artisan commands in the interim or really working directly with my application at all during that time so I am not sure what has caused this issue to arise.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire