Ejemplo n.º 1
0
 /**
  * Execute the console command.
  * @return mixed
  */
 public function handle()
 {
     $media = Media::all();
     foreach ($media as $item) {
         $item->delete();
     }
     $status = Site::handleImport(glob($this->importPath . DS . "*"));
     echo "Import complete.\n";
     echo $status;
 }
Ejemplo n.º 2
0
 /**
  * Execute the console command.
  * @return mixed
  */
 public function handle()
 {
     // Delete media from the database and from the uploads directory.
     if (Schema::hasTable('media')) {
         $media = Media::all();
         $media->each(function ($item) {
             $item->delete();
         });
     }
     $this->call('migrate:reset');
     $this->call('birdmin:launch');
 }