Frontend Editor

Edit frontend page sections (BN + EN).

@if(session('success'))
{{ session('success') }}
@endif @php $isHeaderTab = ($tab ?? 'pages') === 'header'; $isFooterTab = ($tab ?? 'pages') === 'footer'; $footerDefaultsEn = \App\Models\FrontendSetting::defaultValues('en'); $footerDefaultsBn = \App\Models\FrontendSetting::defaultValues('bn'); $footerFieldValue = function (string $key, string $locale) use ($settings, $footerDefaultsEn, $footerDefaultsBn) { $column = $locale === 'bn' ? 'value_bn' : 'value_en'; $fallbacks = $locale === 'bn' ? $footerDefaultsBn : $footerDefaultsEn; $setting = $settings->get($key); return $setting?->{$column} ?? ($fallbacks[$key] ?? ''); }; @endphp
@foreach($pages as $page) @php $isActive = ! $isHeaderTab && $selectedPage->id === $page->id; $base = 'inline-flex items-center rounded-lg px-4 py-2 text-sm font-semibold transition'; $active = 'bg-indigo-600 text-white'; $inactive = 'bg-white text-slate-700 ring-1 ring-slate-200 hover:bg-slate-50'; @endphp {{ ucfirst($page->slug) }} @endforeach @php $base = 'inline-flex items-center rounded-lg px-4 py-2 text-sm font-semibold transition'; $active = 'bg-indigo-600 text-white'; $inactive = 'bg-white text-slate-700 ring-1 ring-slate-200 hover:bg-slate-50'; @endphp Header Settings Footer Settings
@if($isHeaderTab)

Header Settings

Update top header address, phone, email and logo.

@if (!\Illuminate\Support\Facades\Schema::hasTable('frontend_settings'))
Frontend settings table not found. Run migrations first.
@else
@csrf @method('PATCH')
@error('site_address_en')

{{ $message }}

@enderror
@error('site_address_bn')

{{ $message }}

@enderror
@error('site_phone')

{{ $message }}

@enderror
@error('site_email')

{{ $message }}

@enderror
@php $logoPath = optional($settings->get('site_logo_path'))->value_en ?: optional($settings->get('site_logo_path'))->value_bn; @endphp @if ($logoPath)
Site logo
Current logo
@endif @error('site_logo')

{{ $message }}

@enderror

Stored in storage/app/public/logo

@php $faviconPath = optional($settings->get('site_favicon_path'))->value_en ?: optional($settings->get('site_favicon_path'))->value_bn; @endphp @if ($faviconPath)
Site favicon
Current favicon
@endif @error('site_favicon')

{{ $message }}

@enderror

Stored in storage/app/public/favicon

@endif
@elseif($isFooterTab)

Footer Settings

Update footer copy, contact labels, social links, and copyright text.

@if (!\Illuminate\Support\Facades\Schema::hasTable('frontend_settings'))
Frontend settings table not found. Run migrations first.
@else
@csrf @method('PATCH')

Brand Copy

@error('footer_brand_tagline_en')

{{ $message }}

@enderror
@error('footer_brand_tagline_bn')

{{ $message }}

@enderror
@error('footer_brand_description_en')

{{ $message }}

@enderror
@error('footer_brand_description_bn')

{{ $message }}

@enderror

Updates Card

@error('footer_updates_title_en')

{{ $message }}

@enderror
@error('footer_updates_title_bn')

{{ $message }}

@enderror
@error('footer_updates_subtitle_en')

{{ $message }}

@enderror
@error('footer_updates_subtitle_bn')

{{ $message }}

@enderror

Contact Area

@error('footer_contact_title_en')

{{ $message }}

@enderror
@error('footer_contact_title_bn')

{{ $message }}

@enderror
@error('footer_phone_label_en')

{{ $message }}

@enderror
@error('footer_phone_label_bn')

{{ $message }}

@enderror
@error('footer_email_label_en')

{{ $message }}

@enderror
@error('footer_email_label_bn')

{{ $message }}

@enderror
@error('footer_location_label_en')

{{ $message }}

@enderror
@error('footer_location_label_bn')

{{ $message }}

@enderror

Phone, email, and address values still come from Header Settings so they stay in sync across the site.

Social Links & Copyright

@error('footer_facebook_url')

{{ $message }}

@enderror
@error('footer_linkedin_url')

{{ $message }}

@enderror
@error('footer_youtube_url')

{{ $message }}

@enderror
@error('footer_copyright_en')

{{ $message }}

@enderror
@error('footer_copyright_bn')

{{ $message }}

@enderror
@endif
@else @php $homeHeroKeys = [ 'hero_primary', 'hero_emphasis', 'hero_paragraph', 'hero_cta_primary', 'hero_side_heading', 'home_about_title', 'home_about_subtitle', 'home_about_card_1', 'home_about_card_2', 'home_about_card_3', 'home_skill_tracks_title', 'home_skill_tracks_subtitle', 'home_skill_tracks_cta', ]; $sectionsByKey = $sections->keyBy('section_key'); $reasonSections = $sections ->filter(fn ($section) => str_starts_with($section->section_key, 'hero_different_reason_')) ->sortBy(function ($section) { if (preg_match('/^hero_different_reason_(\d+)$/', $section->section_key, $m)) { return (int) $m[1]; } return 9999; }) ->values(); $otherSections = $sections->reject(function ($section) use ($homeHeroKeys) { return in_array($section->section_key, $homeHeroKeys, true) || str_starts_with($section->section_key, 'hero_different_reason_') || str_starts_with($section->section_key, 'home_skill_track_'); }); $skillTrackSections = $sections ->filter(fn ($section) => str_starts_with($section->section_key, 'home_skill_track_')) ->sortBy(function ($section) { if (preg_match('/^home_skill_track_(\d+)$/', $section->section_key, $m)) { return (int) $m[1]; } return 9999; }) ->values(); $existingSkillTrackIndexes = $skillTrackSections->toBase() ->map(function ($section) { if (preg_match('/^home_skill_track_(\d+)$/', $section->section_key, $m)) { return (int) $m[1]; } return null; }) ->filter() ->unique() ->sort() ->values(); $skillTrackIndexes = $existingSkillTrackIndexes; for ($i = 1; $i <= 5; $i++) { if (! $skillTrackIndexes->contains($i)) { $skillTrackIndexes->push($i); } } $skillTrackIndexes = $skillTrackIndexes->sort()->values(); $nextSkillTrackIndex = (int) ($skillTrackIndexes->max() ?? 0) + 1; $existingReasonIndexes = $reasonSections->toBase() ->map(function ($section) { if (preg_match('/^hero_different_reason_(\d+)$/', $section->section_key, $m)) { return (int) $m[1]; } return null; }) ->filter() ->unique() ->sort() ->values(); $reasonIndexes = $existingReasonIndexes; for ($i = 1; $i <= 4; $i++) { if (! $reasonIndexes->contains($i)) { $reasonIndexes->push($i); } } $reasonIndexes = $reasonIndexes->sort()->values(); $nextReasonIndex = (int) ($reasonIndexes->max() ?? 0) + 1; @endphp @if($selectedPage->slug === 'home')

Home Hero

Edit all hero fields in one save.

@csrf @method('PATCH') {{-- hero_primary --}} @php $heroPrimary = $sectionsByKey->get('hero_primary'); @endphp
Section Key
hero_primary
{{-- hero_emphasis --}} @php $heroEmphasis = $sectionsByKey->get('hero_emphasis'); @endphp
Section Key
hero_emphasis
{{-- hero_paragraph --}} @php $heroParagraph = $sectionsByKey->get('hero_paragraph'); @endphp
Section Key
hero_paragraph
{{-- hero_cta_primary --}} @php $heroCtaPrimary = $sectionsByKey->get('hero_cta_primary'); @endphp
Section Key
hero_cta_primary
{{-- hero_side_heading --}} @php $heroSideHeading = $sectionsByKey->get('hero_side_heading'); @endphp
Section Key
hero_side_heading
Used on the home hero side panel heading (frontend falls back to translations if empty).
{{-- hero_different_reason_* (dynamic) --}}
Hero Different Reasons
Use content lines: first line = subtitle, rest = description.
@foreach($reasonIndexes as $i) @php $reasonKey = 'hero_different_reason_' . $i; @endphp @php $reasonSection = $sectionsByKey->get($reasonKey); @endphp
Section Key
{{ $reasonKey }}
@endforeach

Home About (Why Choose iTechBD)

This controls the “কেন iTechBD বেছে নেবেন” section on the home page.

@php $homeAboutTitleBnFallback = __('frontend.home_about_title', [], 'bn'); $homeAboutTitleEnFallback = __('frontend.home_about_title', [], 'en'); $homeAboutSubtitleBnFallback = __('frontend.home_about_subtitle', [], 'bn'); $homeAboutSubtitleEnFallback = __('frontend.home_about_subtitle', [], 'en'); @endphp
@csrf @method('PATCH') {{-- home_about_title --}} @php $homeAboutTitle = $sectionsByKey->get('home_about_title'); @endphp
Section Key
home_about_title
{{-- home_about_subtitle --}} @php $homeAboutSubtitle = $sectionsByKey->get('home_about_subtitle'); @endphp
Section Key
home_about_subtitle
{{-- home_about_card_1..3 --}} @php $aboutCardKeys = ['home_about_card_1', 'home_about_card_2', 'home_about_card_3']; @endphp @foreach($aboutCardKeys as $cardKey) @php $cardSection = $sectionsByKey->get($cardKey); @endphp @php $cardIndex = null; if (preg_match('/^home_about_card_(\d+)$/', $cardKey, $m)) { $cardIndex = (int) $m[1]; } $cardTitleKey = $cardIndex ? ('frontend.home_about_card_' . $cardIndex . '_title') : null; $cardDescKey = $cardIndex ? ('frontend.home_about_card_' . $cardIndex . '_desc') : null; $cardTitleBnFallback = $cardTitleKey ? __($cardTitleKey, [], 'bn') : ''; $cardTitleEnFallback = $cardTitleKey ? __($cardTitleKey, [], 'en') : ''; $cardDescBnFallback = $cardDescKey ? __($cardDescKey, [], 'bn') : ''; $cardDescEnFallback = $cardDescKey ? __($cardDescKey, [], 'en') : ''; @endphp
Section Key
{{ $cardKey }}
@endforeach

Home Skill Tracks

Controls the “আমাদের স্কিল ট্র্যাকসমূহ” section on the home page.

@php $skillTracksTitleBnFallback = __('frontend.home_skill_tracks_title', [], 'bn'); $skillTracksTitleEnFallback = __('frontend.home_skill_tracks_title', [], 'en'); $skillTracksSubtitleBnFallback = __('frontend.home_skill_tracks_subtitle', [], 'bn'); $skillTracksSubtitleEnFallback = __('frontend.home_skill_tracks_subtitle', [], 'en'); $skillTracksDefaultItems = [ 1 => [ 'title' => 'Web Development', 'content' => "Front-end + back-end fundamentals with real projects.\nHTML, CSS, TailwindCSS, JavaScript\nResponsive UI + animations + components\nAPIs, database basics, deployment basics", ], 2 => [ 'title' => 'SEO (Search Engine Optimization)', 'content' => "Technical SEO + content + analytics.\nOn-page, off-page, technical SEO\nKeyword research + content planning\nAnalytics basics + reporting", ], 3 => [ 'title' => '.NET Development', 'content' => "C# + ASP.NET Core for modern applications.\nC# fundamentals + OOP\nASP.NET Core APIs + auth basics\nDatabase + EF Core basics", ], 4 => [ 'title' => 'Graphics Design', 'content' => "Branding + marketing visuals + portfolio.\nPhotoshop / Illustrator fundamentals\nBranding, typography, layouts\nPortfolio + client workflow", ], 5 => [ 'title' => 'Extra Topics (Optional)', 'content' => "UI/UX, Git, communication and teamwork.\nUI/UX basics (Figma)\nGit basics + teamwork\nClient communication", ], ]; $skillTracksDefaultIcons = [ 1 => 'fa-solid fa-code', 2 => 'fa-solid fa-magnifying-glass', 3 => 'fa-brands fa-microsoft', 4 => 'fa-solid fa-palette', 5 => 'fa-solid fa-star', ]; // WordPress-like picker: show ALL free Font Awesome icons (loaded via AJAX). @endphp
@csrf @method('PATCH') {{-- home_skill_tracks_title --}} @php $skillTracksTitle = $sectionsByKey->get('home_skill_tracks_title'); @endphp
Section Key
home_skill_tracks_title
{{-- home_skill_tracks_subtitle --}} @php $skillTracksSubtitle = $sectionsByKey->get('home_skill_tracks_subtitle'); @endphp
Section Key
home_skill_tracks_subtitle
{{-- home_skill_tracks_cta --}} @php $skillTracksCta = $sectionsByKey->get('home_skill_tracks_cta'); @endphp
Section Key
home_skill_tracks_cta
{{-- home_skill_track_* (dynamic) --}}
Skill Track Items
Content format: first line = short description, next lines = bullet points.
@foreach($skillTrackIndexes as $i) @php $trackKey = 'home_skill_track_' . $i; @endphp @php $trackSection = $sectionsByKey->get($trackKey); @endphp @php $defaults = $skillTracksDefaultItems[$i] ?? ['title' => '', 'content' => '']; $fallbackTitle = (string) ($defaults['title'] ?? ''); $fallbackContent = (string) ($defaults['content'] ?? ''); $fallbackIcon = (string) ($skillTracksDefaultIcons[$i] ?? 'fa-solid fa-star'); @endphp
Section Key
{{ $trackKey }}
@if($trackSection) @endif
@php $iconValue = (string) old('sections.' . $trackKey . '.icon', optional($trackSection)->icon ?: $fallbackIcon); $previewIconValue = trim($iconValue); $legacyToFa = [ 'code' => 'fa-solid fa-code', 'search' => 'fa-solid fa-magnifying-glass', 'dotnet' => 'fa-brands fa-microsoft', 'design' => 'fa-solid fa-palette', 'sparkles' => 'fa-solid fa-star', 'rocket' => 'fa-solid fa-rocket', 'chart' => 'fa-solid fa-chart-line', 'shield' => 'fa-solid fa-shield-halved', ]; if (array_key_exists($previewIconValue, $legacyToFa)) { $previewIconValue = $legacyToFa[$previewIconValue]; } if ($previewIconValue === '' || !preg_match('/^fa-(solid|regular|brands)\s+fa-[a-z0-9-]+$/', $previewIconValue)) { $previewIconValue = 'fa-solid fa-star'; } @endphp
Tip: use the picker, or type a Font Awesome class like fa-solid fa-code.
@endforeach
{{-- Delete Skill Track Modal --}} {{-- Add Skill Track Modal --}} {{-- Icon Picker Modal --}}
@elseif($selectedPage->slug === 'about') @php $aboutSingles = [ 'hero' => [ 'title_bn' => __('frontend.about_title', [], 'bn'), 'title_en' => __('frontend.about_title', [], 'en'), 'content_bn' => __('frontend.about_subtitle', [], 'bn'), 'content_en' => __('frontend.about_subtitle', [], 'en'), ], 'about_intro' => [ 'title_bn' => __('frontend.about_page_intro_title', [], 'bn'), 'title_en' => __('frontend.about_page_intro_title', [], 'en'), 'content_bn' => __('frontend.about_page_intro_body', [], 'bn'), 'content_en' => __('frontend.about_page_intro_body', [], 'en'), ], 'about_mission' => [ 'title_bn' => __('frontend.about_page_mission_title', [], 'bn'), 'title_en' => __('frontend.about_page_mission_title', [], 'en'), 'content_bn' => __('frontend.about_page_mission_body', [], 'bn'), 'content_en' => __('frontend.about_page_mission_body', [], 'en'), ], 'about_vision' => [ 'title_bn' => __('frontend.about_page_vision_title', [], 'bn'), 'title_en' => __('frontend.about_page_vision_title', [], 'en'), 'content_bn' => __('frontend.about_page_vision_body', [], 'bn'), 'content_en' => __('frontend.about_page_vision_body', [], 'en'), ], 'about_stats_title' => [ 'title_bn' => __('frontend.about_page_stats_title', [], 'bn'), 'title_en' => __('frontend.about_page_stats_title', [], 'en'), 'content_bn' => __('frontend.about_page_stats_subtitle', [], 'bn'), 'content_en' => __('frontend.about_page_stats_subtitle', [], 'en'), ], 'about_cta' => [ 'title_bn' => __('frontend.about_page_cta_title', [], 'bn'), 'title_en' => __('frontend.about_page_cta_title', [], 'en'), 'content_bn' => __('frontend.about_page_cta_body', [], 'bn'), 'content_en' => __('frontend.about_page_cta_body', [], 'en'), ], ]; $aboutValueKeys = ['about_value_1', 'about_value_2', 'about_value_3', 'about_value_4', 'about_value_5', 'about_value_6']; $aboutStatKeys = ['about_stat_1', 'about_stat_2', 'about_stat_3', 'about_stat_4']; @endphp

About Page

Edit the public /about page content (BN + EN).

@csrf @method('PATCH') @foreach($aboutSingles as $key => $fallbacks) @php $sec = $sectionsByKey->get($key); @endphp
Section Key
{{ $key }}
@if($key === 'about_cta')
@endif
@endforeach

Values / Highlights

These render as cards on the About page.

@foreach($aboutValueKeys as $i => $key) @php $sec = $sectionsByKey->get($key); $fallbackTitleBn = __('frontend.about_page_value_' . ($i + 1) . '_title', [], 'bn'); $fallbackTitleEn = __('frontend.about_page_value_' . ($i + 1) . '_title', [], 'en'); $fallbackDescBn = __('frontend.about_page_value_' . ($i + 1) . '_desc', [], 'bn'); $fallbackDescEn = __('frontend.about_page_value_' . ($i + 1) . '_desc', [], 'en'); @endphp
Section Key
{{ $key }}
@endforeach

Stats

Each stat uses title as the big value and content as the label.

@foreach($aboutStatKeys as $i => $key) @php $sec = $sectionsByKey->get($key); $fallbackValueBn = __('frontend.about_page_stat_' . ($i + 1) . '_value', [], 'bn'); $fallbackValueEn = __('frontend.about_page_stat_' . ($i + 1) . '_value', [], 'en'); $fallbackLabelBn = __('frontend.about_page_stat_' . ($i + 1) . '_label', [], 'bn'); $fallbackLabelEn = __('frontend.about_page_stat_' . ($i + 1) . '_label', [], 'en'); @endphp
Section Key
{{ $key }}
@endforeach
@endif

Sections

Edit sections for {{ $selectedPage->slug }}.

@php $sectionsForList = $selectedPage->slug === 'home' ? $otherSections : $sections; @endphp @if($sectionsForList->isEmpty())
No sections found for this page.
@else
@foreach($sectionsForList as $section) @php $isHeroSideHeading = $section->section_key === 'hero_side_heading'; @endphp
Section Key
{{ $section->section_key }}
@if($section->status === 'active') Active @else Inactive @endif
@csrf @method('PATCH')
@if(! $isHeroSideHeading)
@if($section->image_path)
Current
{{ $section->section_key }}
@endif
@endif
@endforeach
@endif
@endif