- added recent uploads

- added my shared items
- added trash
This commit is contained in:
Peter Papp
2021-08-20 11:08:50 +02:00
parent 99e9c0086e
commit 15fba236d7
15 changed files with 459 additions and 116 deletions

View File

@@ -15,25 +15,6 @@ class BrowseFolderContentController
): Collection {
$root_id = $id === 'undefined' ? null : $id;
// Get folder trash items
if ($request->query('trash')) {
// Get folders and files
$folders = Folder::onlyTrashed()
->with('parent')
->where('parent_id', $root_id)
->sortable()
->get();
$files = File::onlyTrashed()
->with('parent')
->where('folder_id', $root_id)
->sortable()
->get();
// Collect folders and files to single array
return collect([$folders, $files])->collapse();
}
// Get folders and files
$folders = Folder::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
->where('parent_id', $root_id)