ldc-legaulois/resources/views/fo/partials/news-breeding-card.blade.php
2025-01-22 14:47:41 +01:00

13 lines
469 B
PHP

@php
$associatedEnum = $model->associated_page;
$staticPageModel = \App\Models\StaticPage::getCachedBreedingStaticPages()->filter(function($staticPage) use ($associatedEnum) {
return $staticPage->type === $associatedEnum;
})->first();
@endphp
@include('fo.partials.news-card', [
'model' => $model,
'routeCustom' => route('fo.breeding.article.show', [
'breeding_static_page' => $staticPageModel,
'published_news_breeding' => $model
])
])