目标类别[DataTypesTableSeederCustom]不存在

时间:2020-05-11 15:33:30

标签: php laravel

我正在使用laravel6和voyager,我正在php artisan make: command EcommerceInstall之后创建使用cmd进行安装的artisan命令 ,我从DataTypesTableSeeder复制了database/seeder,并用DataTypesTableSeederCustom重命名了,我修改了我写的文件EcommerceInstall.php,但它给了我错误class [DataTypesTableSeederCustom] does not exist. 我想我忘了上课了,但我不知道在哪里。

EcommerceInstall.php

public function handle()
    {
        if ($this->confirm('this well delete all you current data and install the dummy default data, Are you sure ?')) {

                File::deleteDirectory(public_path('storage/products/dummy'));
                $this->callSilent('storage:link');
                $copySuccess = File::copyDirectory(public_path('img/products'),public_path('storage/products/dummy'));
                if($copySuccess){
                    $this->info('images succefully copied to storage folder');
                }
                $this->call('migrate:fresh', [
                    '--seed' => true,
                ]);
                $this->call('db:seed', [
                    '--class' => 'DataTypesTableSeederCustom'
                ]);

   $this->info('Dummy data installed');

        }

0 个答案:

没有答案