@php $genericRepository = new \App\Repositories\GenericRepository('Product'); $data = $genericRepository->get_latest(4); $brandRepository = new \App\Repositories\GenericRepository('Brand'); $brands = $brandRepository->get_all(); @endphp
{{--
--}}

{{ $values['heading']['title'] }}

@foreach ($brands as $index => $brand) @php $brand_link = url($brand->seo_by_locale($locale)->slug); @endphp
    @foreach ($brand->products->where('special', 1)->where('active', 1)->sortByDesc('id')->take(4) as $i => $product) @php $files = array_values($product->getFiles('images')->toArray()); $photo = isset($files[0]) ? Utils::cropImg(public_path($files[0]['file']), 400, 400) : ''; $link = url($product->seo_by_locale($locale)->slug); @endphp
  • @endforeach
@endforeach