feat(category): add banner functionality to categories with related resource and migration tests

This commit is contained in:
2026-10-01 14:29:31 -03:00
parent 675d76fcb0
commit 5ddc304435
7 changed files with 212 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ use App\Domains\Commerce\Catalog\Resources\CatalogFeaturedGroupResource;
use App\Domains\Commerce\Catalog\Resources\CatalogItemDetailResource;
use App\Domains\Commerce\Catalog\Resources\CatalogSearchItemResource;
use App\Domains\Commerce\Catalog\Resources\CatalogVariantOptionsResource;
use App\Domains\Commerce\Catalog\Resources\CategoryResource;
use App\Domains\Commerce\Catalog\Services\CatalogItemAllowanceService;
use App\Domains\Commerce\Catalog\Services\CatalogService;
use App\Domains\Commerce\Catalog\Services\FeaturedGroupService;
@@ -78,11 +79,7 @@ class CatalogController extends Controller
$allowances->attach($items->getCollection(), $this->userId($request));
return CatalogSearchItemResource::collection($items)->additional([
'category' => [
'id' => $category->id,
'nombre' => $category->nombre,
'categoria_id' => $category->categoria_id,
],
'category' => CategoryResource::make($category)->resolve($request),
'layout' => $tenant->search_product_layout->value,
'group_layout' => $tenant->search_group_layout->value,
]);