*/ public function handle(): Collection { return Group::get(); } public function asController(): Response { session()->put('menu', 'group'); session()->put('title', 'Gruppierungen'); return Inertia::render('group/Index', [ 'data' => GroupResource::collection(Group::where('parent_id', null)->withCount('children')->get()), ]); } }