protected function needsMigration($path) { $publisher = $this->package->migrationPublisher(); $publisher->filesToPublish($path, null); $this->registerResources($publisher); return $this; }
protected function backup($file) { $backupPath = $this->app->make('path.storage') . '/packages/backup/' . $this->package->getName(); if (!$this->filesystem->isDirectory($backupPath)) { $this->filesystem->makeDirectory($backupPath, 0755, true); } $newFile = $backupPath . '/' . date('Ymdhis') . '_' . basename($file); $this->filesystem->move($file, $newFile); }