※随時追加していく
基本的にlaravel 6.x
##Seederでダミーデータ作成時
..実行したコマンド
php artisan db:seed --class=FooSeeder
..エラー
Illuminate\Contracts\Container\BindingResolutionException : Target class [FooSeeder] does not exist.
at /var/www/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
801|
802| try {
803| $reflector = new ReflectionClass($concrete);
804| } catch (ReflectionException $e) {
> 805| throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
806| }
807|
808| // If the type is not instantiable, the developer is attempting to resolve
809| // an abstract type such as an Interface or Abstract Class and there is
Exception trace:
1 ReflectionException::("Class FooSeeder does not exist")
/var/www/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
2 ReflectionClass::__construct()
/var/www/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
Please use the argument -v to see more details.
..解決方法
composer dump-autoload