@extends('frontend.layouts.app') @section('title-suffix') {{ __('welcome.title') }} @endsection @section('main-content') {{ __('welcome.hero-1-txt') }} {{ __('welcome.hero-txt-2') }} {{ __('welcome.hero-btn') }} {{ __('welcome.hero-2-txt') }} {{ __('welcome.hero-txt-2') }} {{ __('welcome.hero-btn') }} {{ __('welcome.hero-3-txt') }} {{ __('welcome.hero-txt-2') }} {{ __('welcome.hero-btn') }} {{-- --}} {{ __('welcome.categories-featured') }} @php /* script to render the categories columns as rows of 7/12 - 5/12, and then 5/12 - 7/12 ... */ $counter = 1; // the counter $width1 = 'col-lg-7'; // largeur 1 $width2 = 'col-lg-5'; // largeur 2 @endphp @foreach ($categories as $key => $category) @php $class = $key % 2 === 0 ? $width1 : $width2; // the key is odd or even ? if ($counter > 1) { [$width1, $width2] = [$width2, $width1]; // if counter reach 2 exchange the values of the widths $counter = 1; // reinitialize counter to 1 } else { $counter++; // else increment counter } @endphp @if (count($category->products)) {{ $category->name }} @if ($category->photo != '') {{ __('welcome.categories-explore') }} @else {{ $category->products[0]->name }} {{ __('welcome.categories-explore') }} @endif @endif @endforeach {{ __('welcome.products') }} @foreach ($products_chunk as $products) @foreach ($products as $key => $product) {{ $product->name }} {{ $product->selling_price }} FCFA {{ __('welcome.add-to-cart') }} @if (in_array($product->code, $wishlistProductCodes)) @else @endif @endforeach @endforeach {{-- @php $counter = 1; $key = 0; $length = (int) ceil(count($products) / 8); @endphp @for ($i = 0; $i < $length; $i++) @for ($key; $key < count($products); $key++) {{ $products[$key]->name }} {{ $products[$key]->selling_price }} FCFA {{ __('welcome.add-to-cart') }} @if (in_array($products[$key]->code, $wishlistProductCodes)) @else @endif @if ($key == 7) @php $key++; @endphp @break @endif @endfor @endfor --}} {{ __('welcome.our-offer') }} {{ __('welcome.booking') }} @include('frontend.partials.featured') {{ __('welcome.newsletter') }} {{ __('welcome.newsletter-subscribe') }} {{ __('welcome.newsletter-btn') }} @if ($brands) @foreach ($brands as $brand) @endforeach @else @endif @endsection
{{ __('welcome.hero-txt-2') }}
{{ $category->name }}