copyToRestore() public method

Copy the backup file received from the post data to the restore folder
public copyToRestore ( Input $input ) : string
$input Input "The post input data"
return string "Filename"
Ejemplo n.º 1
0
 public function postRestore()
 {
     Sentry::logout();
     $synchronizer = new Synchronize($this);
     $restore_file = $synchronizer->copyToRestore(Input::all());
     $synchronizer->restore($restore_file);
     return Redirect::to('/');
 }
Ejemplo n.º 2
0
 public function postRestore()
 {
     $input = Input::all();
     $synchronizer = new Synchronize($this);
     if (isset($input['backup_id'])) {
         $backup = Backup::findOrFail($input['backup_id']);
         $restore_file = $backup->file;
     } else {
         $restore_file = $synchronizer->copyToRestore($input);
     }
     Sentry::logout();
     $synchronizer->restore($restore_file);
     return Redirect::to('/');
 }