@extends('layouts.app') @section('title', 'Home') @section('content') @php $heroTitle = $settings?->hero_title ?: 'Online Shopping'; $heroDescription = $settings?->hero_description ?: 'Discover top-quality products at unbeatable prices. Shop smart with secure checkout and fast delivery.'; $heroButtonText = $settings?->hero_button_text ?: 'Shop Now'; $heroButtonUrl = $settings?->hero_button_url ?: route('user.products.index'); $heroImage = $settings?->hero_image ? asset($settings->hero_image) : asset('assets/img/ecom.png'); $featuredSectionTitle = $settings?->featured_section_title ?: 'Featured Products'; $recentSectionTitle = $settings?->recent_section_title ?: 'Recent Products'; $categoriesSectionTitle = $settings?->categories_section_title ?: 'Popular Categories'; $featuresSectionTitle = $settings?->features_section_title ?: 'Why Shop With Us'; $freeShippingAmount = \App\Support\Currency::symbol() . number_format((float) ($settings?->free_shipping_threshold ?? 50), 0); $featureShippingTitle = $settings?->feature_shipping_title ?: 'Fast Shipping'; $featureShippingText = $settings?->feature_shipping_text ?: "Free delivery on orders over {$freeShippingAmount}"; $featurePaymentTitle = $settings?->feature_payment_title ?: 'Secure Payment'; $featurePaymentText = $settings?->feature_payment_text ?: '100% secure and encrypted transactions'; $featureReturnsTitle = $settings?->feature_returns_title ?: 'Easy Returns'; $featureReturnsText = $settings?->feature_returns_text ?: '30-day money-back guarantee'; $featureSupportTitle = $settings?->feature_support_title ?: '24/7 Support'; $featureSupportText = $settings?->feature_support_text ?: 'Dedicated customer support always available'; @endphp

{{ $heroTitle }}

{{ $heroDescription }}

{{ $heroButtonText }}
Welcome

{{ $featuredSectionTitle }}

@forelse($featuredProducts as $product)
{{ $product->name }} @if($product->is_featured) Featured @endif
{{ substr($product->name, 0, 30) }}

{{ substr($product->description, 0, 60) }}...

{{ \App\Support\Currency::symbol() }}{{ number_format($product->price, 2) }}
@empty
No featured products available
@endforelse

{{ $recentSectionTitle }}

@forelse($recentProducts as $product)
{{ $product->name }}
{{ substr($product->name, 0, 30) }}

{{ substr($product->description, 0, 60) }}...

{{ \App\Support\Currency::symbol() }}{{ number_format($product->price, 2) }}
@empty
No products available
@endforelse

{{ $categoriesSectionTitle }}

@forelse($categories as $category) @empty
No categories available
@endforelse

{{ $featuresSectionTitle }}

{{ $featureShippingTitle }}

{{ $featureShippingText }}

{{ $featurePaymentTitle }}

{{ $featurePaymentText }}

{{ $featureReturnsTitle }}

{{ $featureReturnsText }}

{{ $featureSupportTitle }}

{{ $featureSupportText }}

@endsection