I've read other issues about "ReflectionException Class ClassName does not exist" which refers to database seeders. I tried solutions from these questions and they didn't solve problem.
I've run into problem when tried to create model with command php artisan make:model Country
(I've already had countries table)
after that I constantly get error
vagrant@homestead:~/Code/l53$ php artisan
[ReflectionException]
Class Country does not exist
What I did after that:
run:
composer update --no-scripts composer dump-autoload -o sudo composer self-update
deleted bootstrap/cache/services.php (there was only this file)
After every of these steps after running 'php artisan' I still receive:
[ReflectionException]
Class Country does not exist
and after running composer update
I receive:
vagrant@homestead:~/Code/l53$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Illuminate\\Foundation\\ComposerScripts::postUpdate
php artisan optimize
[ReflectionException]
Class Country does not exist
Script php artisan optimize handling the post-update-cmd event returned with error code 1
Any help is appreciated. Thanks in advance.
PS I use laravel 5.3 via homestead
I tried to remove vendor folder and 'composer update' (which recreated it) which didn't help. but after 'vagrant reload' it (php artisan) worked... strange issue)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.