@php $slug = $page->slug ?? 'page'; $icons = [ 'about-us' => 'fa-building-columns', 'mission' => 'fa-bullseye', 'vision' => 'fa-eye', 'objective' => 'fa-list-check', 'online-education' => 'fa-laptop-file', 'career-development' => 'fa-briefcase', 'chancellor-founder' => 'fa-user-tie', 'finance' => 'fa-coins', 'academic-affairs' => 'fa-building-columns', 'teaching' => 'fa-chalkboard-user', 'student-affairs' => 'fa-users', 'research-administration' => 'fa-microscope', 'administration' => 'fa-sitemap', ]; $icon = $page->icon ?? ($icons[$slug] ?? 'fa-book-open-reader'); $summary = $page->summary ?? \Illuminate\Support\Str::limit(strip_tags($page->body ?? ''), 180) ?: 'Learn online, grow beyond, and build the future through a modern digital learning environment.'; $typeLabel = $page->type_label ?? 'University Information'; $itemType = $page->type ?? null; $coverImage = $page->cover_image ?? null; $coverUrl = $coverImage ? asset('storage/' . $coverImage) : asset('images/afghan-online-education/logo.png'); $relatedItems = $relatedItems ?? collect(); \App\Models\Finance\ModuleSetting::ensureDefaults(); $publicFormVisible = fn ($key) => \App\Models\Finance\ModuleSetting::allows('online_forms') && \App\Models\Finance\ModuleSetting::allows($key); $typeIndexRoutes = [ 'office' => ['label' => 'All Offices', 'icon' => 'fa-building-columns', 'href' => route('front.offices.index')], 'committee' => ['label' => 'All Committees', 'icon' => 'fa-people-group', 'href' => route('front.committees.index')], 'academic_section' => ['label' => 'Academic Sections', 'icon' => 'fa-layer-group', 'href' => route('front.academic_sections.index')], ]; $quickLinks = [ $typeIndexRoutes[$itemType] ?? ['label' => 'Website Directory', 'icon' => 'fa-compass', 'href' => route('front.directory')], $publicFormVisible('public_form_online_apply') ? ['label' => 'Apply Online', 'icon' => 'fa-file-signature', 'href' => route('front.apply.create')] : null, ['label' => 'Programs', 'icon' => 'fa-layer-group', 'href' => route('front.programs.index')], ['label' => 'Courses', 'icon' => 'fa-book-open', 'href' => route('front.courses.index')], $publicFormVisible('public_form_contact') ? ['label' => 'Contact', 'icon' => 'fa-envelope', 'href' => route('front.contact')] : null, ]; $quickLinks = array_values(array_filter($quickLinks)); @endphp
{{ __('front.home') }}
Afghan Online Education

{{ $page->title }}

{{ $summary }}

{{ $typeLabel }}

Overview

@if(! $page->body)

{{ __('front.no_content_yet') }}

@else {!! $page->body !!} @endif
@if($publicFormVisible('public_form_online_apply'))

Start your learning journey today

Apply online, explore programs, or contact the institution for guidance.

Apply Online
@endif