This commit is contained in:
root 2019-12-22 14:58:49 +08:00
parent b3d73e5417
commit 2514bf4638
2 changed files with 7 additions and 7 deletions

View File

@ -7,21 +7,21 @@ use App\Models\User;
use App\Utils\Helper; use App\Utils\Helper;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
class V2boardInit extends Command class V2boardInstall extends Command
{ {
/** /**
* The name and signature of the console command. * The name and signature of the console command.
* *
* @var string * @var string
*/ */
protected $signature = 'v2board:init'; protected $signature = 'v2board:install';
/** /**
* The console command description. * The console command description.
* *
* @var string * @var string
*/ */
protected $description = 'v2board 初始化'; protected $description = 'v2board 安装';
/** /**
* Create a new command instance. * Create a new command instance.
@ -41,7 +41,7 @@ class V2boardInit extends Command
public function handle() public function handle()
{ {
if (\File::exists(base_path() . '/.lock')) { if (\File::exists(base_path() . '/.lock')) {
abort(500, 'V2board 已安装,如需重新初始化请删除目录下.lock文件'); abort(500, 'V2board 已安装,如需重新安装请删除目录下.lock文件');
} }
\Artisan::call('key:generate'); \Artisan::call('key:generate');
\Artisan::call('config:cache'); \Artisan::call('config:cache');

View File

@ -22,9 +22,9 @@
> ``` > ```
2. 从 `install.sql` 文件中恢复表 2. 从 `install.sql` 文件中恢复表
3. 执行 `cp .env.example .env` 然后配置它 3. 执行 `cp .env.example .env` 然后配置它
4. 执行配置脚本 4. 执行安装
> ```shell script > ```install script
> sh init.sh > php artisan v2board:install
> ``` > ```
> >