@extends('ecommerce::layout.store-layout') @php $title = static fn($value) => is_array($value) ? ($value[app()->getLocale()] ?? $value['en'] ?? reset($value)) : ($value ?: ''); $image = static fn($value) => $value ?: asset('assets/images/pro/1.jpg'); $localizedName = is_array($merchant->company_name ?? null) ? ($merchant->company_name[app()->getLocale()] ?? $merchant->company_name['en'] ?? reset($merchant->company_name)) : ($merchant->company_name ?? $merchant->name); $localizedDesc = is_array($merchant->description ?? null) ? ($merchant->description[app()->getLocale()] ?? $merchant->description['en'] ?? reset($merchant->description)) : ($merchant->description ?? ''); $merchantLogo = $merchant->logo ?: asset('assets/ecommerce/images/logo.png'); $merchantRating = (float) ($merchant->rate ?? $merchant->rating ?? 0); $totalProducts = $products instanceof \Illuminate\Pagination\LengthAwarePaginator ? $products->total() : $products->count(); // Split the store's own uploads the way visitors expect to see them. $attachmentImages = ($attachments ?? collect())->filter->is_image->values(); $attachmentDocs = ($attachments ?? collect())->reject->is_image->values(); $fileSize = static function ($bytes) { $kb = round(((float) $bytes) / 1024, 0); return $kb >= 1024 ? __('ecommerce::ecommerce.file_size_mb', ['size' => number_format($kb / 1024, 1)]) : __('ecommerce::ecommerce.file_size_kb', ['size' => number_format($kb)]); }; @endphp @section('title', $localizedName) @section('active-nav', 'merchants') @section('page-styles') @endsection @section('content')
{{ $localizedDesc }}
@endif