$this->service->getAll(), ]); } public function store(CategoryRequest $request): RedirectResponse { $this->service->create($request->validated()); Inertia::flash('toast', ['type' => 'success', 'message' => 'Kategori berhasil ditambahkan.']); return to_route('admin.master.categories.index'); } public function update(CategoryRequest $request, Category $category): RedirectResponse { $this->service->update($category, $request->validated()); Inertia::flash('toast', ['type' => 'success', 'message' => 'Kategori berhasil diperbarui.']); return to_route('admin.master.categories.index'); } public function destroy(Category $category): RedirectResponse { $this->service->delete($category); Inertia::flash('toast', ['type' => 'success', 'message' => 'Kategori berhasil dihapus.']); return to_route('admin.master.categories.index'); } }