refactor: rename delete methods to destroy in Product and RawMaterialVariant controllers

This commit is contained in:
Yoga Pangestu 2026-08-09 22:22:32 +07:00
parent 59cc0a5309
commit 10d2529dcd
3 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ public function create(): Response
public function store(ProductRequest $request): RedirectResponse
{
return $this->handleAction(
fn () => $this->service->create($request->validated()),
fn () => $this->service->store($request->validated()),
'Produk berhasil ditambahkan.',
'admin.master.products.index',
'admin.master.products.create'
@ -71,7 +71,7 @@ public function update(ProductRequest $request, Product $product): RedirectRespo
public function destroy(Product $product): RedirectResponse
{
return $this->handleAction(
fn () => $this->service->delete($product),
fn () => $this->service->destroy($product),
'Produk berhasil dihapus.',
'admin.master.products.index'
);

View File

@ -39,7 +39,7 @@ public function update(ProductVariantRequest $request, Product $product, Product
public function destroy(Product $product, ProductVariant $variant): RedirectResponse
{
return $this->handleAction(
fn () => $this->variantService->delete($product, $variant),
fn () => $this->variantService->destroy($product, $variant),
'Varian berhasil dihapus.',
'admin.master.products.index'
);

View File

@ -38,7 +38,7 @@ public function update(RawMaterialVariantRequest $request, RawMaterial $rawMater
public function destroy(RawMaterial $rawMaterial, RawMaterialPrice $variant): RedirectResponse
{
return $this->handleAction(
fn () => $this->variantService->delete($rawMaterial, $variant),
fn () => $this->variantService->destroy($rawMaterial, $variant),
'Varian berhasil dihapus.',
'admin.master.raw-materials.index'
);