Fix update script

This commit is contained in:
Pig Fang 2018-08-22 10:21:05 +08:00
parent 4a23b8d858
commit a790d21ee8

View File

@ -1,7 +1,14 @@
<?php
use Artisan;
$msg = [];
option(['version' => '4.0.0']);
try {
Artisan::call('migrate', ['--force' => true]);
$msg[] = '【数据库】升级成功!';
} catch (Exception $e) {
$msg[] = '【数据库】更新数据表失败,错误信息:'.$e->getMessage();
}
Artisan::call('view:clear');
option(['version' => '4.0.0']);