@php $catOptions = []; foreach ($categories as $cat) { $categoryOptions[$cat['slug'] ?? ''] = $cat['label'] ?? ($cat['slug'] ?? ''); } @endphp
@csrf

📚 āϕ⧋āĻ°ā§āϏ āĻ“ āĻŽāĻĄāĻŋāωāϞ

āϕ⧋āĻ°ā§āϏ, āĻŽāĻĄāĻŋāωāϞ āĻ“ āĻ­āĻŋāĻĄāĻŋāĻ“

@if($courseDraft) @php $isNew = $editSlug === '__new__'; @endphp

📘 āϕ⧋āĻ°ā§āϏ⧇āϰ āϤāĻĨā§āϝ

@if($isNew) @else @endif
@include('admin.partials.field', ['name' => 'course[title]', 'label' => 'āϕ⧋āĻ°ā§āϏ⧇āϰ āύāĻžāĻŽ', 'value' => $courseDraft['title'] ?? '']) @include('admin.partials.field', ['name' => 'course[category]', 'label' => 'āĻ•ā§āϝāĻžāϟāĻžāĻ—āϰāĻŋ (slug)', 'value' => $courseDraft['category'] ?? '', 'type' => 'select', 'options' => $categoryOptions]) @include('admin.partials.field', ['name' => 'course[categoryLabel]', 'label' => 'āĻ•ā§āϝāĻžāϟāĻžāĻ—āϰāĻŋ āϞ⧇āĻŦ⧇āϞ', 'value' => $courseDraft['categoryLabel'] ?? '']) @include('admin.partials.field', ['name' => 'course[instructor]', 'label' => 'āχāĻ¨ā§āϏāĻŸā§āϰāĻžāĻ•ā§āϟāϰ', 'value' => $courseDraft['instructor'] ?? '']) @include('admin.partials.field', ['name' => 'course[duration]', 'label' => 'āϏāĻŽāϝāĻŧāĻ•āĻžāϞ', 'value' => $courseDraft['duration'] ?? '']) @include('admin.partials.field', ['name' => 'course[lessons]', 'label' => 'āϞ⧇āϏāύ āϏāĻ‚āĻ–ā§āϝāĻž', 'value' => $courseDraft['lessons'] ?? '']) @include('admin.partials.field', ['name' => 'course[level]', 'label' => 'āϞ⧇āϭ⧇āϞ', 'value' => $courseDraft['level'] ?? '']) @include('admin.partials.field', ['name' => 'course[badge]', 'label' => 'āĻŦā§āϝāĻžāϜ', 'value' => $courseDraft['badge'] ?? '']) @include('admin.partials.field', ['name' => 'course[price]', 'label' => 'āĻŽā§‚āĻ˛ā§āϝ', 'value' => $courseDraft['price'] ?? '']) @include('admin.partials.field', ['name' => 'course[emoji]', 'label' => 'āχāĻŽā§‹āϜāĻŋ', 'value' => $courseDraft['emoji'] ?? '']) @include('admin.partials.field', ['name' => 'course[color]', 'label' => 'āĻ•āĻžāϞāĻžāϰ (CSS gradient)', 'value' => $courseDraft['color'] ?? '', 'full' => true]) @include('admin.partials.field', ['name' => 'course[description]', 'label' => 'āĻŦāĻ°ā§āĻŖāύāĻž', 'value' => $courseDraft['description'] ?? '', 'type' => 'textarea', 'full' => true]) @include('admin.partials.lines', ['name' => 'course[learn]', 'label' => 'āϝāĻž āϝāĻž āĻļāĻŋāĻ–āĻŦ⧇āύ', 'value' => $courseDraft['learn'] ?? [], 'full' => true])

🔍 āĻāχ āϕ⧋āĻ°ā§āϏ⧇āϰ SEO (Google-āĻ āϕ⧀āĻ­āĻžāĻŦ⧇ āĻĻ⧇āĻ–āĻžāĻŦ⧇)

💡 āĻ–āĻžāϞāĻŋ āϰāĻžāĻ–āϞ⧇ āϕ⧋āĻ°ā§āϏ⧇āϰ āύāĻžāĻŽ āĻ“ āĻŦāĻ°ā§āĻŖāύāĻž āĻĨ⧇āϕ⧇āχ meta āϤ⧈āϰāĻŋ āĻšāĻŦ⧇āĨ¤ āύāĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āϟ āĻ•āϰ⧇ āĻĻāĻŋāϞ⧇ āϏ⧇āϟāĻŋāχ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻšāĻŦ⧇āĨ¤

@include('admin.partials.field', ['name' => 'course[seo_title]', 'label' => 'SEO Title (āĻ–āĻžāϞāĻŋ āϰāĻžāĻ–āϞ⧇ āϕ⧋āĻ°ā§āϏ⧇āϰ āύāĻžāĻŽ)', 'value' => $courseDraft['seo_title'] ?? '', 'full' => true]) @include('admin.partials.field', ['name' => 'course[seo_keywords]', 'label' => 'SEO Keywords (āĻ•āĻŽāĻž āĻĻāĻŋāϝāĻŧ⧇ āφāϞāĻžāĻĻāĻž)', 'value' => $courseDraft['seo_keywords'] ?? '', 'full' => true]) @include('admin.partials.field', ['name' => 'course[seo_description]', 'label' => 'SEO Description (āĻ–āĻžāϞāĻŋ āϰāĻžāĻ–āϞ⧇ āĻŦāĻ°ā§āĻŖāύāĻž)', 'value' => $courseDraft['seo_description'] ?? '', 'type' => 'textarea', 'full' => true]) @include('admin.partials.field', ['name' => 'course[seo_noindex]', 'label' => 'āϏāĻžāĻ°ā§āϚ āχāĻžā§āϜāĻŋāύ⧇ āχāύāĻĄā§‡āĻ•ā§āϏ āĻ•āϰāĻŦ⧇āύ?', 'value' => ! empty($courseDraft['seo_noindex']) ? '1' : '0', 'type' => 'select', 'options' => ['0' => '✅ āχāύāĻĄā§‡āĻ•ā§āϏ āĻšāĻŦ⧇', '1' => '⛔ noindex']]) @include('admin.partials.image', ['name' => 'course[seo_image]', 'label' => 'āĻļ⧇āϝāĻŧāĻžāϰ āĻ›āĻŦāĻŋ (OG image)', 'value' => $courseDraft['seo_image'] ?? ''])

đŸŽŦ āĻŽāĻĄāĻŋāωāϞ āĻ“ āĻ­āĻŋāĻĄāĻŋāĻ“

@foreach($courseDraft['modules'] ?? [] as $i => $m)
#{{ $i + 1 }}
@include('admin.partials.field', ['name' => "course[modules][$i][title]", 'label' => 'āĻŽāĻĄāĻŋāωāϞ⧇āϰ āύāĻžāĻŽ', 'value' => $m['title'] ?? '']) @include('admin.partials.field', ['name' => "course[modules][$i][duration]", 'label' => 'āϏāĻŽāϝāĻŧāĻ•āĻžāϞ', 'value' => $m['duration'] ?? '']) @include('admin.partials.field', ['name' => "course[modules][$i][lessons]", 'label' => 'āϞ⧇āϏāύ', 'value' => $m['lessons'] ?? '']) @include('admin.partials.field', ['name' => "course[modules][$i][video]", 'label' => 'āĻ­āĻŋāĻĄāĻŋāĻ“ āϞāĻŋāĻ‚āĻ• (YouTube/MP4)', 'value' => $m['video'] ?? '', 'full' => true]) @include('admin.partials.lines', ['name' => "course[modules][$i][topics]", 'label' => 'āϟāĻĒāĻŋāĻ•', 'value' => $m['topics'] ?? [], 'full' => true])
@endforeach
@endif