$this->service->paginated( ...$request->validatedWithDefaults(), ), ]); } public function create(): Response { return Inertia::render('admin/manage/restock/create', [ 'products' => $this->productVariantService->getForRestock(), ]); } public function store(RestockRequest $request): RedirectResponse { return $this->handleAction( fn () => $this->service->store($request->validated()), 'Restock berhasil ditambahkan.', 'admin.manage.restocks.index', 'admin.manage.restocks.create' ); } public function edit(Restock $restock): Response { return Inertia::render('admin/manage/restock/edit', [ 'restock' => $this->service->getForEdit($restock), 'products' => $this->productVariantService->getForRestock(), ]); } public function update(RestockRequest $request, Restock $restock): RedirectResponse { return $this->handleAction( fn () => $this->service->update($restock, $request->validated()), 'Restock berhasil diperbarui.', 'admin.manage.restocks.index', 'admin.manage.restocks.edit', ['restock' => $restock] ); } public function destroy(Restock $restock): RedirectResponse { return $this->handleAction( fn () => $this->service->destroy($restock), 'Restock berhasil dihapus.', 'admin.manage.restocks.index' ); } }