- gate implementation

- protected shared view fix
This commit is contained in:
Čarodej
2021-09-24 10:52:19 +02:00
parent d40108f6a9
commit 19cc01131b
84 changed files with 876 additions and 406 deletions
@@ -25,7 +25,7 @@ class BrowseTrashContentController
$files = File::onlyTrashed()
->with('parent')
->where('folder_id', $root_id)
->where('parent_id', $root_id)
->sortable()
->get();
@@ -55,8 +55,8 @@ class BrowseTrashContentController
->with(['parent'])
->where('user_id', $user_id)
->where(function ($query) use ($folders_trashed) {
$query->whereNull('folder_id');
$query->orWhereNotIn('folder_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))));
$query->whereNull('parent_id');
$query->orWhereNotIn('parent_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))));
})
->sortable()
->get();