copyToRestore() 공개 메소드

Copy the backup file received from the post data to the restore folder
public copyToRestore ( Input $input ) : string
$input Input "The post input data"
리턴 string "Filename"
예제 #1
0
 public function postRestore()
 {
     Sentry::logout();
     $synchronizer = new Synchronize($this);
     $restore_file = $synchronizer->copyToRestore(Input::all());
     $synchronizer->restore($restore_file);
     return Redirect::to('/');
 }
예제 #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('/');
 }