This commit is contained in:
f4ilji
2024-12-24 18:43:59 +05:00
parent 99e012d727
commit ed7ac493a0
9 changed files with 32 additions and 21 deletions
@@ -134,7 +134,7 @@ class ClientAdditionalEducationController extends Controller
$breadcrumbs = null;
}
$seo = $additionalEducation->seo;
$seo = $additionalEducation->seo ?? null;
return Inertia::render('Client/Additional-educations/Show', compact('additionalEducation', 'breadcrumbs', 'seo'));
}
@@ -28,7 +28,7 @@ class ClientDepartmentController extends Controller
->first());
$directions = $this->groupProgramsByDirection($department->programs);
$seo = $department->seo;
$seo = $department->seo ?? null;
return Inertia::render('Client/Departments/Show', compact('department', 'departments', 'directions', 'seo'));
}
@@ -19,7 +19,7 @@ class ClientDivisionController extends Controller
{
$divisions = DivisionResource::collection(Division::query()->where('is_active', true)->get());
$division = new DivisionResource(Division::with('workers.userDetail')->where('is_active', true)->where('slug', $slug)->firstOrFail());
$seo = $division->seo;
$seo = $division->seo ?? null;
return Inertia::render('Client/Divisions/Show', compact('divisions', 'division', 'seo'));
}
}
@@ -66,7 +66,7 @@ class ClientEventController extends Controller
$breadcrumbs = null;
}
$seo = $event->seo;
$seo = $event->seo ?? null;
return Inertia::render('Client/Events/Show', compact('event', 'breadcrumbs', 'seo'));
}
@@ -144,7 +144,8 @@ class ClientPostController extends Controller
$breadcrumbs = null;
}
$seo = $post->seo;
$seo = $post->seo ?? null;
return Inertia::render('Client/Posts/Show', compact('post', 'breadcrumbs', 'seo'));
}
@@ -120,7 +120,7 @@ class ClientProgramController extends Controller
return [$formEducational->value => $formEducational->getLabel()];
});
$seo = $program->seo;
$seo = $program->seo ?? null;
return Inertia::render('Client/Programs/Show', compact('program', 'formsEdu', 'seo'));
}
+2 -1
View File
@@ -40,7 +40,8 @@ class PageController extends Controller
$breadcrumbs = null;
}
$seo = $page->seo;
$seo = $page->seo ?? null;
$page = new PageResource($page);