@extends('user.public.layout') @section('title', 'PRO EARN') @section('content') @php /* |-------------------------------------------------------------------------- | Search and filter values |-------------------------------------------------------------------------- */ $search = $search ?? request('search'); $categoryId = $categoryId ?? request('category_id'); $defaultProductImage = asset('images/default-product.png'); $currentPageUrl = url()->current(); /* |-------------------------------------------------------------------------- | Social links from General Settings |-------------------------------------------------------------------------- */ $gsSocial = \App\Models\GeneralSetting::where( 'key', 'social_links' )->first(); $storedSocialLinks = $gsSocial ? json_decode($gsSocial->value, true) : []; if (!is_array($storedSocialLinks)) { $storedSocialLinks = []; } $socialLinks = array_merge([ 'facebook' => '#', 'youtube' => '#', 'telegram' => '#', 'whatsapp' => '#', ], $storedSocialLinks); $socialItems = [ [ 'key' => 'facebook', 'name' => 'Facebook', 'text' => 'ফেসবুকে যুক্ত হোন', 'icon' => 'fa-brands fa-facebook-f', 'class' => 'social-facebook', 'url' => $socialLinks['facebook'] ?? '#', ], [ 'key' => 'youtube', 'name' => 'YouTube', 'text' => 'ইউটিউব দেখুন', 'icon' => 'fa-brands fa-youtube', 'class' => 'social-youtube', 'url' => $socialLinks['youtube'] ?? '#', ], [ 'key' => 'telegram', 'name' => 'Telegram', 'text' => 'টেলিগ্রামে যুক্ত হোন', 'icon' => 'fa-brands fa-telegram', 'class' => 'social-telegram', 'url' => $socialLinks['telegram'] ?? '#', ], [ 'key' => 'whatsapp', 'name' => 'WhatsApp', 'text' => 'হোয়াটসঅ্যাপে যুক্ত হোন', 'icon' => 'fa-brands fa-whatsapp', 'class' => 'social-whatsapp', 'url' => $socialLinks['whatsapp'] ?? '#', ], ]; @endphp
{{-- Banner slider --}} @if(!empty($sliders) && count($sliders)) @endif {{-- Search --}}
@if($categoryId || $search) সব ফিল্টার সরান @endif
{{-- Categories --}} @if(!empty($categories) && $categories->count())

জনপ্রিয় ক্যাটাগরি

@foreach($categories as $category) @php $categoryPhoto = $category->photo_path ?? null; $isActiveCategory = (string) $categoryId === (string) $category->id; $categoryInitial = mb_substr(trim($category->name), 0, 1); @endphp
@if($categoryPhoto) {{ $category->name }} @else @endif
{{ $category->name }}
@endforeach
@endif {{-- Products --}}

আপনার প্রয়োজনীয় পণ্য

@if($products->count())
@foreach($products as $product) @php $firstProductImage = $product->images->first(); $productImage = $firstProductImage ? $firstProductImage->image_url : $defaultProductImage; $productDetailsUrl = route('user.product.details', $product->slug); $hasDiscount = $product->display_price['has_discount']; $discountPercent = $hasDiscount ? rtrim(rtrim($product->display_price['discount_percent'], '0'), '.') : null; @endphp @endforeach
@if($products->hasMorePages()) আরো পণ্য লোড হচ্ছে @else সব পণ্য দেখানো হয়েছে @endif
@else

কোনো পণ্য পাওয়া যায়নি

অন্য কোনো নাম দিয়ে সার্চ করুন অথবা ফিল্টার সরিয়ে দেখুন।

@endif
{{-- Social community section (Slick Compact Footer Row) --}}
@endsection