refactor: rename delete methods to destroy in Product and RawMaterialVariant controllers
This commit is contained in:
parent
59cc0a5309
commit
10d2529dcd
@ -42,7 +42,7 @@ public function create(): Response
|
|||||||
public function store(ProductRequest $request): RedirectResponse
|
public function store(ProductRequest $request): RedirectResponse
|
||||||
{
|
{
|
||||||
return $this->handleAction(
|
return $this->handleAction(
|
||||||
fn () => $this->service->create($request->validated()),
|
fn () => $this->service->store($request->validated()),
|
||||||
'Produk berhasil ditambahkan.',
|
'Produk berhasil ditambahkan.',
|
||||||
'admin.master.products.index',
|
'admin.master.products.index',
|
||||||
'admin.master.products.create'
|
'admin.master.products.create'
|
||||||
@ -71,7 +71,7 @@ public function update(ProductRequest $request, Product $product): RedirectRespo
|
|||||||
public function destroy(Product $product): RedirectResponse
|
public function destroy(Product $product): RedirectResponse
|
||||||
{
|
{
|
||||||
return $this->handleAction(
|
return $this->handleAction(
|
||||||
fn () => $this->service->delete($product),
|
fn () => $this->service->destroy($product),
|
||||||
'Produk berhasil dihapus.',
|
'Produk berhasil dihapus.',
|
||||||
'admin.master.products.index'
|
'admin.master.products.index'
|
||||||
);
|
);
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public function update(ProductVariantRequest $request, Product $product, Product
|
|||||||
public function destroy(Product $product, ProductVariant $variant): RedirectResponse
|
public function destroy(Product $product, ProductVariant $variant): RedirectResponse
|
||||||
{
|
{
|
||||||
return $this->handleAction(
|
return $this->handleAction(
|
||||||
fn () => $this->variantService->delete($product, $variant),
|
fn () => $this->variantService->destroy($product, $variant),
|
||||||
'Varian berhasil dihapus.',
|
'Varian berhasil dihapus.',
|
||||||
'admin.master.products.index'
|
'admin.master.products.index'
|
||||||
);
|
);
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public function update(RawMaterialVariantRequest $request, RawMaterial $rawMater
|
|||||||
public function destroy(RawMaterial $rawMaterial, RawMaterialPrice $variant): RedirectResponse
|
public function destroy(RawMaterial $rawMaterial, RawMaterialPrice $variant): RedirectResponse
|
||||||
{
|
{
|
||||||
return $this->handleAction(
|
return $this->handleAction(
|
||||||
fn () => $this->variantService->delete($rawMaterial, $variant),
|
fn () => $this->variantService->destroy($rawMaterial, $variant),
|
||||||
'Varian berhasil dihapus.',
|
'Varian berhasil dihapus.',
|
||||||
'admin.master.raw-materials.index'
|
'admin.master.raw-materials.index'
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user