Fix missing route params and sitemap refresh
This commit is contained in:
parent
37a888e8dc
commit
2ef635a4a2
4 changed files with 20 additions and 5 deletions
|
|
@ -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
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -55,7 +55,10 @@
|
|||
@if ($moment->featured_type === "recettes")
|
||||
<a href="{{ route('recipe', $object->slug) }}">
|
||||
@elseif ($moment->featured_type === "articles")
|
||||
<a href="{{ route('club.infos.child', $object->slug) }}">
|
||||
<a href="{{ route('club.infos.child', [
|
||||
'articleTag' => $object->type,
|
||||
'publishedArticle' => $object->slug
|
||||
]) }}">
|
||||
@elseif ($moment->featured_type === "produits")
|
||||
<a href="{{ route('product.show', $object->slug) }}">
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -150,7 +150,10 @@ $vegetal = ($recipe->products->first()->range->slug ?? '') == 'le-vegetal';
|
|||
<h3>{{ __('Astuces Associées') }}</h3>
|
||||
@foreach($recipe->articles as $article)
|
||||
<div class="tip">
|
||||
<a href="{{ route('club.infos.child', $article->slug) }}" title="{{ $article->title }}">
|
||||
<a href="{{ route('club.infos.child', [
|
||||
'articleTag' => $article->type,
|
||||
'publishedArticle' => $article->slug
|
||||
]) }}" title="{{ $article->title }}">
|
||||
<figure><img src="{{ $article->picture }}" alt="{{ $article->title }}" /></figure>
|
||||
<p>{{ $article->title }}</p>
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue