diff --git a/app/View/Components/Layout/NavbarCategory.php b/app/View/Components/Layout/NavbarCategory.php index dba898f..1642d48 100644 --- a/app/View/Components/Layout/NavbarCategory.php +++ b/app/View/Components/Layout/NavbarCategory.php @@ -4,6 +4,8 @@ namespace App\View\Components\Layout; use App\Repositories\Catalog\CategoryRepository; use App\Repositories\Catalog\GenderRepository; +use App\Repositories\Catalog\BrandRepository; + use Closure; use Illuminate\Contracts\View\View; use Illuminate\View\Component; @@ -13,6 +15,7 @@ class NavbarCategory extends Component public $genders = []; public $categories = []; + public $brands = []; /** * Create a new component instance. */ @@ -22,13 +25,18 @@ class NavbarCategory extends Component $genderRepository = new GenderRepository(); $categoryRepository = new CategoryRepository(); + $brandsRepository = new BrandRepository(); $this->genders = $genderRepository->getList([]); + $this->genders = collect($this->genders)->chunk(7); + $this->categories = $categoryRepository->getList([]); // chunk $this->categories = collect($this->categories)->chunk(7); - + + $this->brands = $brandsRepository->getList([]); + $this->brands = collect($this->brands)->chunk(7); } /** diff --git a/resources/views/components/layout/header.blade.php b/resources/views/components/layout/header.blade.php index a9d04b9..cd99a37 100644 --- a/resources/views/components/layout/header.blade.php +++ b/resources/views/components/layout/header.blade.php @@ -269,7 +269,7 @@ - +