@php use App\Models\GeneralSetting; $me = auth()->user(); $photo = $me && !empty($me->profile_photo) ? asset(ltrim($me->profile_photo,'/')) : asset('images/logo.png'); $name = $me?->name ?? 'GUEST'; $mobile = $me?->mobile ?? '----'; // মোবাইল নাম্বার $ref = $me?->referral_code ?? '------'; $isActiveVal = (int)($me->is_active ?? 0); $acctLabel = $isActiveVal === 1 ? 'VERIFIED SELLER' : 'GENERAL CUSTOMER'; $appVersion = config('app.version','1.0'); $displayName = trim((string)$name); $words = preg_split('/\s+/u', $displayName, -1, PREG_SPLIT_NO_EMPTY); if ($words && count($words) > 3) { $displayName = $words[0].' '.$words[1]; } $socialRow = GeneralSetting::where('key','social_links')->value('value'); $social = $socialRow ? json_decode($socialRow, true) : []; $fb = $social['facebook'] ?? '#'; $wa = $social['whatsapp'] ?? '#'; $tg = $social['telegram'] ?? '#'; $yt = $social['youtube'] ?? '#'; @endphp