withFilter($filter)->paginate(20)); } public function asController(ActionRequest $request): Response { session()->put('menu', 'activity'); session()->put('title', 'Tätigkeiten'); $filter = ActivityFilterScope::fromRequest($request->input('filter')); return Inertia::render('activity/VIndex', [ 'data' => $this->handle($filter), 'toolbar' => [ ['href' => route('activity.create'), 'label' => 'Tätigkeit erstellen', 'color' => 'primary', 'icon' => 'plus'], ] ]); } }