{{ \Illuminate\Support\Str::limit($testimonial->quote, 118) }}
@extends('public.layout.app') @section('title', __('front.home')) @php $pageSummary = function ($page, $fallback, $limit = 210) { if ($page && ! empty($page->body)) { return \Illuminate\Support\Str::limit(trim(strip_tags($page->body)), $limit); } return $fallback; }; $about = $pages['about'] ?? null; $mission = $pages['mission'] ?? null; $vision = $pages['vision'] ?? null; $career = $pages['career'] ?? null; $heroBackground = ! empty($websiteSettings['home_hero_image']) ? asset('storage/' . $websiteSettings['home_hero_image']) : asset('images/afghan-online-education/logo.png'); $homeUrl = function ($value, $fallback) { $value = trim((string) $value); if ($value === '') { return $fallback; } if (\Illuminate\Support\Str::startsWith($value, ['http://', 'https://', '#'])) { return $value; } return url($value); }; \App\Models\Finance\ModuleSetting::ensureDefaults(); $publicFormVisible = fn ($key) => \App\Models\Finance\ModuleSetting::allows('online_forms') && \App\Models\Finance\ModuleSetting::allows($key); $frontendSectionVisible = fn ($key) => \App\Support\VisibilitySettings::isFrontendSectionVisible($key); $heroPrimaryUrl = $homeUrl($websiteSettings['home_hero_primary_button_url'] ?? null, route('front.apply.create')); if (! $publicFormVisible('public_form_online_apply') && $heroPrimaryUrl === route('front.apply.create')) { $heroPrimaryUrl = route('front.programs.index'); } $heroSecondaryUrl = $homeUrl($websiteSettings['home_hero_secondary_button_url'] ?? null, route('front.programs.index')); $statsCards = [ ['label' => 'Faculties', 'value' => $stats['faculties'] ?? 0, 'icon' => 'fa-landmark', 'href' => route('front.faculties.index'), 'tone' => 'emerald'], ['label' => 'Departments', 'value' => \Illuminate\Support\Facades\Schema::hasTable('departments') ? \App\Models\Department::count() : 0, 'icon' => 'fa-diagram-project', 'href' => route('front.departments.index'), 'tone' => 'sky'], ['label' => 'Courses', 'value' => $stats['courses'] ?? 0, 'icon' => 'fa-book-open', 'href' => route('front.courses.index'), 'tone' => 'amber'], ['label' => 'Enrolled Students', 'value' => $stats['enrollments'] ?? ($stats['students'] ?? 0), 'icon' => 'fa-user-graduate', 'href' => route('front.programs.index'), 'tone' => 'rose'], ]; $formLinks = [ ['module' => 'public_form_online_apply', 'label' => 'Online Apply', 'note' => 'Admission form', 'icon' => 'fa-file-signature', 'href' => route('front.apply.create')], ['module' => 'public_form_admission_track', 'label' => 'Track Admission', 'note' => 'Check application status', 'icon' => 'fa-clipboard-check', 'href' => route('front.admission.track')], ['module' => 'public_form_membership', 'label' => 'Membership', 'note' => 'Join the community', 'icon' => 'fa-id-card', 'href' => route('front.membership.create')], ['module' => 'public_form_volunteer_lecturer', 'label' => 'Volunteer Lecturer', 'note' => 'Teach and mentor', 'icon' => 'fa-chalkboard-user', 'href' => route('front.volunteer.create')], ['module' => 'public_form_volunteer_staff', 'label' => 'Volunteer Staff', 'note' => 'Administrative support', 'icon' => 'fa-people-carry-box', 'href' => route('front.volunteer_staff.create')], ['module' => 'public_form_donation', 'label' => 'Donation', 'note' => 'Support students', 'icon' => 'fa-hand-holding-heart', 'href' => route('front.donation.create')], ['module' => 'public_form_contact', 'label' => 'Contact Form', 'note' => 'Send a message', 'icon' => 'fa-envelope', 'href' => route('front.contact')], ]; $formLinks = collect($formLinks)->filter(fn ($link) => $publicFormVisible($link['module']))->values(); @endphp @section('body')
{{ $websiteSettings['home_hero_description'] ?? 'Afghan Online Education brings accessible, high-quality education to learners across Afghanistan and the diaspora through modern online programs, courses, and digital services.' }}
{{ $websiteSettings['home_hero_panel_text'] ?? 'Modern courses, academic programs, student and teacher portals, admissions, digital resources, and public services designed for Afghan learners everywhere.' }}
“{{ $pageSummary($mission, 'Education is the most powerful pathway to rebuild communities, create opportunity, and give every Afghan learner a stronger future.', 260) }}”
Afghan Online Education — Mission{{ $pageSummary($mission, 'Deliver accessible, high-quality online education with practical academic support for Afghan learners everywhere.') }}
Vision{{ $pageSummary($vision, 'Become a trusted digital learning institution that connects students with knowledge, values, skills, and opportunity.') }}
{{ $websiteSettings['home_story_about_label'] ?? 'About us' }}{{ $pageSummary($about, 'Afghan Online Education brings structured programs, student services, digital resources, and public academic information into one modern website.') }}