trash fixed

This commit is contained in:
Peter Papp
2021-03-16 10:30:36 +01:00
parent f3783e6f98
commit adbe35e8b5
4 changed files with 9 additions and 5 deletions

View File

@@ -105,8 +105,10 @@ class BrowseController extends Controller
$files_trashed = File::onlyTrashed()
->with(['parent'])
->where('user_id', $user_id)
->whereNull('folder_id')
->orWhereNotIn('folder_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))))
->where(function($query) use ($folders_trashed) {
$query->whereNull('folder_id');
$query->orWhereNotIn('folder_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))));
})
->sortable()
->get();