controller refactoring part 23

This commit is contained in:
Peter Papp
2021-07-21 18:00:45 +02:00
parent 9fb9b8a1b0
commit 91cb795054
18 changed files with 360 additions and 312 deletions
-22
View File
@@ -115,28 +115,6 @@ class HelperService
return Storage::download($path, $file->getRawOriginal('thumbnail'));
}
/**
* Get all folders and files under the share record
*
* @param $id
* @param $shared
* @return array
*/
public function get_items_under_shared_by_folder_id($id, $shared): array
{
$folders = Folder::where('user_id', $shared->user_id)
->where('parent_id', $id)
->sortable()
->get();
$files = File::where('user_id', $shared->user_id)
->where('folder_id', $id)
->sortable()
->get();
return [$folders, $files];
}
/**
* @param Share $shared
*/