diff --git a/app/Http/Controllers/Bo/ArticlesController.php b/app/Http/Controllers/Bo/ArticlesController.php index adf64b57..223d6ac9 100644 --- a/app/Http/Controllers/Bo/ArticlesController.php +++ b/app/Http/Controllers/Bo/ArticlesController.php @@ -54,7 +54,10 @@ class ArticlesController extends Controller } } if ($request->notification === 1) { - event(new NewNotification(NotificationType::info(), route('club.infos.child', $request->slug), $article)); + event(new NewNotification(NotificationType::info(), route('club.infos.child', [ + 'articleTag' => $request->type->value, + 'publishedArticle' => $request->slug + ]), $article)); return redirect()->route('bo.articles.edit', $article->id) ->with('success', 'Notification envoyée, Enregistré !'); } @@ -147,7 +150,10 @@ class ArticlesController extends Controller event( new NewNotification( NotificationType::info(), - route('club.infos.child', $request->slug), + route('club.infos.child', [ + 'articleTag' => $article->type->value, + 'publishedArticle' => $article->slug + ]), $article ) ); diff --git a/config/refresh-sitemap.php b/config/refresh-sitemap.php index 4f72401d..d3fd508e 100644 --- a/config/refresh-sitemap.php +++ b/config/refresh-sitemap.php @@ -40,10 +40,13 @@ return [ 'slugMeatType' => [MeatTypes::class, 'slug'] ], 'club.infos.child' => [ + 'articleTag' => [Articles::class, 'type'], 'publishedArticle' => [Articles::class, 'slug'] ], + 'club.indexByCategory' => [ + 'articleTag' => [Articles::class, 'type'] + ] ], - /** * You can put route conditions here * These will be used to decide whether the route should appear diff --git a/resources/views/front/moment.blade.php b/resources/views/front/moment.blade.php index 23b1583b..411e316c 100644 --- a/resources/views/front/moment.blade.php +++ b/resources/views/front/moment.blade.php @@ -55,7 +55,10 @@ @if ($moment->featured_type === "recettes") @elseif ($moment->featured_type === "articles") - + @elseif ($moment->featured_type === "produits") @endif diff --git a/resources/views/front/recipes/show.blade.php b/resources/views/front/recipes/show.blade.php index ed709120..acbeda24 100644 --- a/resources/views/front/recipes/show.blade.php +++ b/resources/views/front/recipes/show.blade.php @@ -150,7 +150,10 @@ $vegetal = ($recipe->products->first()->range->slug ?? '') == 'le-vegetal';

{{ __('Astuces Associées') }}

@foreach($recipe->articles as $article)
- +
{{ $article->title }}

{{ $article->title }}