Việc cần giải quyết
Chào mọi người
Mình đang cần chạy seed trong Laravel 8 như lệnh dưới:
php artisan db:seed
Mình đã khai báo đầy đủ file DatabaseSeeder.php cũng như các file chứa các class dùng để seed. Tuy nhiên app báo lại lỗi không tồn tại class trong file seed, mặc dù file sheet đã tồn tại.
Ai biết cách giải quyết xin chỉ giùm mình
Nội dung lỗi
Illuminate\Contracts\Container\BindingResolutionException
Target class [Database\Seeders\AcHolidayTypes] does not exist.
at D:\_dev\sample\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 D:\_dev\sample\vendor\laravel\framework\src\Illuminate\Container\Container.php:877
ReflectionException::("Class Database\Seeders\AcHolidayTypes does not exist")
2 D:\_dev\sample\vendor\laravel\framework\src\Illuminate\Container\Container.php:877
ReflectionClass::__construct("Database\Seeders\AcHolidayTypes")
Trả lời