call('key:generate'); // 删除上一次保留的数据表 $this->call('migrate:reset'); // 重置数据库迁移,删除所有表 // 删除上一次保留的文件 $this->call('moon:delete'); // 删除之前的文件或数据 // 禁止在安装过程中将产品添加到搜索索引 Product::$addToSearch = false; /**************************************** * 1. 迁移数据表 * 2. 数据库迁移 * 3. 复制静态资源 * 4. 创建软链接 ****************************************/ $this->call('migrate'); // 执行数据库迁移,创建所需的数据表 $this->call('db:seed'); // 填充数据库,插入初始数据 $this->call('moon:copy'); // 复制静态资源到公共目录 $this->call('storage:link'); // 创建存储目录的软链接,以便访问存储的文件 // 更新首页数据,防止上一次遗留数据的影响 $this->call('moon:update-home'); // 更新首页相关数据 // 生成全文索引 $this->call('add:shop-to-search'); // 为商城产品生成搜索索引 // 直接开启监听队列 // $this->info('queue starting please don`t close cmd windows!!!'); // $this->call('queue:work', ['--tries' => '3']); // 启动队列工作进程,处理队列任务 } }