@extends('layouts.store', ['title' => 'RaseedNow | شحن ألعاب وبطاقات رقمية']) @section('content') @php $isEnglish = app()->getLocale() === 'en'; $defaultHeroSlides = collect(['hero-gaming-original.png', 'hero-digital-original.png'])->map(fn ($slide) => asset('images/hero/'.$slide)); $heroSlides = $banners->whereNotNull('image_path')->pluck('image_path')->map(fn ($path) => asset($path))->values(); $heroSlides = $heroSlides->isNotEmpty() ? $heroSlides : $defaultHeroSlides; $categoryImages = ['category-100.png', 'category-101.png', 'category-102.png', 'category-103.png', 'category-104.png', 'category-105.png', 'category-106.png', 'category-107.png']; $productImages = collect(range(108, 143))->map(fn ($number) => 'product-'.$number.'.webp')->values(); $heroSideServices = $services->filter(fn ($service) => in_array($service->slug, ['pubg-mobile', 'free-fire', 'clash-of-clans', 'jawaker']))->values(); $heroSideServices = $heroSideServices->count() >= 4 ? $heroSideServices : $services->take(4)->values(); $categoryLabels = $isEnglish ? ['Game top-up', 'Game cards', 'E-payment', 'Social media', 'Activation keys', 'Shopping', 'Telecom cards', 'App subscriptions'] : ['شحن الألعاب', 'بطاقات الالعاب', 'الدفع الإلكتروني', 'سوشيال ميديا', 'مفاتيح التفعيل', 'التسوق', 'بطاقات الإتصالات', 'اشتراكات التطبيقات']; $sections = [ ['title' => $isEnglish ? 'Game top-up' : 'شحن الألعاب', 'slug' => 'games'], ['title' => $isEnglish ? 'Game cards' : 'بطاقات الألعاب', 'slug' => 'gift-cards'], ['title' => $isEnglish ? 'E-payment' : 'الدفع الإلكتروني', 'slug' => 'deals'], ['title' => $isEnglish ? 'App subscriptions' : 'اشتراكات التطبيقات', 'slug' => 'subscriptions'], ]; @endphp
@foreach($heroSideServices as $service) @php($sideImage = $service->image_path ? asset($service->image_path) : asset('images/kroti/'.$productImages[$loop->index % $productImages->count()])) {{ $service->name_ar }} {{ $isEnglish ? $service->name_en : $service->name_ar }} @endforeach
@if($query)

{{ $isEnglish ? 'Search results' : 'نتائج البحث' }}

{{ $isEnglish ? 'View all' : 'عرض الكل' }}
@endif @foreach($sections as $section) @php($sectionServices = $services->filter(fn ($service) => optional($service->category)->slug === $section['slug'])->values())
@endforeach
@endsection