Check with below command
php artisan view:clear
php artisan cache:clear
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a very frustrating problem and I have at a loss for what is causing it.
Using Laravel 5.7, 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. The same issue also arises when making a seeder. Every time I try I get:
In Container.php line 779:
Class view does not exist
I have noticed that upon running the 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 again and I encounter the same error.
Any help will be greatly appreciated. I'm sure you can appreciate how frustrating this must be.
Please or to participate in this conversation.