jqh 4 yıl önce
ebeveyn
işleme
19a3023d5d
2 değiştirilmiş dosya ile 8 ekleme ve 24 silme
  1. 1 1
      src/Admin.php
  2. 7 23
      src/Console/UpdateCommand.php

+ 1 - 1
src/Admin.php

@@ -30,7 +30,7 @@ class Admin
     use HasAssets;
     use HasHtml;
 
-    const VERSION = '2.0.20-beta';
+    const VERSION = '2.0.21-beta';
 
     const SECTION = [
         // 往 <head> 标签内输入内容

+ 7 - 23
src/Console/UpdateCommand.php

@@ -6,34 +6,18 @@ use Illuminate\Console\Command;
 
 class UpdateCommand extends Command
 {
-    /**
-     * The console command name.
-     *
-     * @var string
-     */
     protected $signature = 'admin:update';
 
-    /**
-     * The console command description.
-     *
-     * @var string
-     */
     protected $description = 'Update the admin package';
 
-    /**
-     * Execute the console command.
-     *
-     * @return void
-     */
     public function handle()
     {
-        try {
-            $this->call('admin:publish', ['--assets --migrations --force']);
-            $this->call('migrate');
-            $this->info('DcatAdmin has updated successfully!');
-        } catch (\Exception $exception) {
-            $this->error('Woops! Updating has failed: ' . $exception->getMessage());
-        }
-
+        $this->call('admin:publish', [
+            '--assets'     => true,
+            '--migrations' => true,
+            '--lang'       => true,
+            '--force'      => true,
+        ]);
+        $this->call('migrate');
     }
 }