@@ 417-427 (lines=11) @@ | ||
414 | * @param \Illuminate\Http\Request $request |
|
415 | * @return \Illuminate\Http\JsonResponse |
|
416 | */ |
|
417 | protected function deleteDirectory(Request $request) |
|
418 | { |
|
419 | try { |
|
420 | $dir = $request->input('s'); |
|
421 | $this->storage->deleteDirectory($dir); |
|
422 | ||
423 | return $this->notifySuccess($dir . ' successfully deleted!'); |
|
424 | } catch (\ErrorException $e) { |
|
425 | return $this->notifyError($e->getMessage()); |
|
426 | } |
|
427 | } |
|
428 | ||
429 | /** |
|
430 | * Delete a single file from request. |
|
@@ 435-445 (lines=11) @@ | ||
432 | * @param \Illuminate\Http\Request $request |
|
433 | * @return \Illuminate\Http\JsonResponse |
|
434 | */ |
|
435 | protected function deleteFile(Request $request) |
|
436 | { |
|
437 | try { |
|
438 | $file = $request->input('s'); |
|
439 | $this->storage->delete($file); |
|
440 | ||
441 | return $this->notifySuccess($file . ' successfully deleted!'); |
|
442 | } catch (\ErrorException $e) { |
|
443 | return $this->notifyError($e->getMessage()); |
|
444 | } |
|
445 | } |
|
446 | } |
|
447 |