Skip to content

Commit

Permalink
Implementing moving folders
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Oct 9, 2017
1 parent 76287b3 commit a9e5a7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/Media/Http/Controllers/Api/MoveMediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public function __invoke(MoveMediaRequest $request)
if ($file->is_folder === false) {
$this->file->move($file, $destination);
}
if ($file->is_folder === true) {
$this->folder->move($file, $destination);
}
}

return response()->json([
Expand All @@ -52,6 +55,7 @@ private function makeRootFolder() : File
return new File([
'id' => 0,
'folder_id' => 0,
'path' => config('asgard.media.config.files-path'),
]);
}
}

0 comments on commit a9e5a7e

Please sign in to comment.