@php $courseMenu = collect([ ['slug' => 'graphics-design', 'icon' => '🎨'], ['slug' => 'digital-marketing', 'icon' => '📈'], ['slug' => 'web-development', 'icon' => '💻'], ['slug' => 'freelancing', 'icon' => '💼'], ])->map(function ($m) use ($categories) { $cat = collect($categories)->firstWhere('slug', $m['slug']); return $cat ? array_merge($m, ['label' => $cat['label'] ?? $m['slug']]) : null; })->filter()->values(); $branchList = collect($branches ?? [])->filter(fn ($b) => ! empty($b['slug'])); $cur = request()->path(); $isActive = function ($href) use ($cur) { if (str_starts_with($href, '/#')) return false; if ($href === '/') return $cur === '/'; $p = ltrim($href, '/'); return $cur === $p || str_starts_with($cur, $p . '/'); }; $links = [ ['href' => '/#certificate', 'label' => 'সার্টিফিকেট'], ['href' => '/#success', 'label' => 'সাকসেস স্টোরি'], ['href' => '/about', 'label' => 'সম্পর্কে'], ['href' => '/contact', 'label' => 'যোগাযোগ'], ]; @endphp