Skip to content

Commit 52b7410

Browse files
committed
Customer website
1 parent 9db8063 commit 52b7410

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/Actions/Catalogue/ProductCategory/UpdateProductCategory.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use App\Actions\Traits\WithActionUpdate;
1111
use App\Http\Resources\Catalogue\DepartmentResource;
12+
use App\Models\Catalogue\ProductCategory;
1213
use App\Models\Market\ShopProductCategory;
1314
use Lorisleiva\Actions\ActionRequest;
1415

@@ -19,7 +20,7 @@ class UpdateProductCategory
1920

2021
private bool $asAction=false;
2122

22-
public function handle(ShopProductCategory $productCategory, array $modelData): ShopProductCategory
23+
public function handle(ProductCategory $productCategory, array $modelData): ProductCategory
2324
{
2425
$productCategory = $this->update($productCategory, $modelData, ['data']);
2526
//ProductCategoryHydrateUniversalSearch::dispatch($productCategory);
@@ -47,21 +48,21 @@ public function rules(): array
4748
];
4849
}
4950

50-
public function action(ShopProductCategory $productCategory, array $objectData): ShopProductCategory
51+
public function action(ProductCategory $productCategory, array $objectData): ProductCategory
5152
{
5253
$this->asAction=true;
5354
$this->setRawAttributes($objectData);
5455
$validatedData = $this->validateAttributes();
5556
return $this->handle($productCategory, $validatedData);
5657
}
5758

58-
public function asController(ShopProductCategory $productCategory, ActionRequest $request): ShopProductCategory
59+
public function asController(ProductCategory $productCategory, ActionRequest $request): ProductCategory
5960
{
6061
$productCategory = $productCategory::where('slug', $request->route()->parameters)->first();
6162
return $this->handle($productCategory, $request->all());
6263
}
6364

64-
public function jsonResponse(ShopProductCategory $productCategory): DepartmentResource
65+
public function jsonResponse(ProductCategory $productCategory): DepartmentResource
6566
{
6667
return new DepartmentResource($productCategory);
6768
}

0 commit comments

Comments
 (0)