*/ public function handle(InvoiceFilterScope $filter): LengthAwarePaginator { return Invoice::withFilter($filter)->with('positions')->paginate(15); } public function asController(ActionRequest $request): Response { session()->put('menu', 'invoice'); session()->put('title', 'Rechnungen'); $filter = InvoiceFilterScope::fromRequest($request->input('filter', '')); return Inertia::render('invoice/Index', [ 'data' => InvoiceResource::collection($this->handle($filter)), ]); } }