Target class [Guiliredu\\BrazilianCityMigrationSeed\\Database\\Seeds\\DatabaseSeeder] does not exist.
Closed this issue · 2 comments
Olá, obrigado por compartilhar o seu conhecimento.
Estou tentando utilizar o pacote no Laravel 8 e está sendo apresentado o seguinte erro:
`PS B:\xampp\htdocs\sistema\cronus> php artisan db:seed --class="Guiliredu\BrazilianCityMigrationSeed\Database\Seeds\DatabaseSeeder"
Illuminate\Contracts\Container\BindingResolutionException
Target class [Guiliredu\BrazilianCityMigrationSeed\Database\Seeds\DatabaseSeeder] does not exist.
at B:\xampp\htdocs\sistema\cronus\vendor\laravel\framework\src\Illuminate\Container\Container.php:879
875▕
876▕ try {
877▕ $reflector = new ReflectionClass($concrete);
878▕ } catch (ReflectionException $e) {
➜ 879▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
880▕ }
881▕
882▕ // If the type is not instantiable, the developer is attempting to resolve
883▕ // an abstract type such as an Interface or Abstract Class and there is
1 B:\xampp\htdocs\sistema\cronus\vendor\laravel\framework\src\Illuminate\Container\Container.php:877
ReflectionException::("Class Guiliredu\BrazilianCityMigrationSeed\Database\Seeds\DatabaseSeeder does not exist")
2 B:\xampp\htdocs\sistema\cronus\vendor\laravel\framework\src\Illuminate\Container\Container.php:877
ReflectionClass::__construct("Guiliredu\BrazilianCityMigrationSeed\Database\Seeds\DatabaseSeeder")
PS B:\xampp\htdocs\sistema\cronus>`
Você poderia me ajudar?
Amigo, isso pode acontecer porque as classes de Seed são carregadas de maneira diferente pelo composer e as vezes fica cache do autoload sem elas. Roda um composer du
(dump-autoload) que deve resolver.
Infelizmente o comando composer dumpautoload não resolveu