mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-28 06:20:42 -05:00
update: internal controller
This commit is contained in:
@@ -33,13 +33,11 @@ class InternalController extends Controller
|
||||
*/
|
||||
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$internalGroup = cache()->rememberForever('internal_group', fn () => Group::where('is_internal', '=', true)->pluck('id'));
|
||||
|
||||
return view('Staff.internals.index', [
|
||||
'internalGroups' => Internal::orderBy('name')->get(),
|
||||
'internalUsers' => User::with(['group', 'internals'])
|
||||
->withCount('torrents as total_uploads')
|
||||
->where('group_id', '=', $internalGroup)
|
||||
->whereIn('group_id', Group::select('id')->where('is_internal', '=', true))
|
||||
->orWhereHas('internals')
|
||||
// Count recent uploads for current user
|
||||
->withCount(['torrents as recent_uploads' => fn ($query) => $query
|
||||
|
||||
Reference in New Issue
Block a user