/** * 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; }
/** * 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'); }