我正在使用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');
}