ECOMMERCE/app/View/Components/Grocery/ShopByLifestyle.php

35 lines
704 B
PHP

<?php
namespace App\View\Components\Grocery;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
use App\Repositories\Catalog\BrandRepository;
class ShopByLifestyle extends Component
{
protected $brands = [];
/**
* Create a new component instance.
*/
public function __construct(BrandRepository $brandRepository)
{
//
$this->brands = $brandRepository->getList([]);
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.grocery.shop-by-lifestyle', [
'brands' => $this->brands,
]);
}
}