visuddhinanda 2 tahun lalu
induk
melakukan
1d4f3b11de
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      app/Console/Commands/ExportOffline.php

+ 5 - 1
app/Console/Commands/ExportOffline.php

@@ -10,7 +10,7 @@ class ExportOffline extends Command
 {
     /**
      * The name and signature of the console command.
-     *
+     * php artisan export:offline lzma
      * @var string
      */
     protected $signature = 'export:offline {format?}';
@@ -39,6 +39,9 @@ class ExportOffline extends Command
      */
     public function handle()
     {
+        $exportStop = storage_path('app/public/export/offline/.stop');
+        $file = fopen($exportStop,'w');
+        fclose($file);
         //建表
         $this->info('create db');
         $this->call('export:create.db');
@@ -104,6 +107,7 @@ class ExportOffline extends Command
                    'min_app_ver'=>'1.3',
                     ];
         Cache::put('/offline/index',$info);
+        unlink($exportStop);
         return 0;
     }
 }