Ejemplo n.º 1
0
 private function testAndStoreCredentials($credentials)
 {
     $testing = filesystem()->init($credentials);
     try {
         $testing->listContents();
         // If that didn't break anything continue...
         $this->storageRepository->saveCredentials(Auth::id(), $credentials);
         flash()->success('Storage successfully added');
     } catch (\Exception $e) {
         $this->testError = $e->getMessage();
         flash()->error('There was a problem verifying the connection credentials');
     }
     return redirect()->route('storage_path');
 }
Ejemplo n.º 2
0
 public function destroy($storageId)
 {
     $this->storageRepository->destroy($storageId, Auth::id());
     flash()->success('Storage provider removed');
     return redirect()->back();
 }