Update (post): Fix broken routes
This commit is contained in:
@@ -15,7 +15,7 @@ public static function handle(Post $post)
|
||||
|
||||
if ($post->save()) {
|
||||
if (app()->environment() == 'production') {
|
||||
$post_url = route('front.post', ['slug' => $post->slug]);
|
||||
$post_url = route('front.post', ['slug' => $post->slug, 'category_slug' => $post->category->slug]);
|
||||
|
||||
try {
|
||||
IndexNow::submit($post_url);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="mb-1 text-body-secondary">{{ $post->published_at->format('M j') }}</div>
|
||||
@endif
|
||||
<p class="mb-3">{{ $post->excerpt }}</p>
|
||||
<a href="{{ route('front.post', ['slug' => $post->slug]) }}"
|
||||
<a href="{{ route('front.post', ['slug' => $post->slug, 'category_slug' => $post->category->slug]) }}"
|
||||
class="icon-link gap-1 icon-link-hover stretched-link">
|
||||
Continue reading
|
||||
<svg class="bi">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="col-lg-12 px-0">
|
||||
<h1 class="display-4 fst-italic">{{ $featured_post->title }}</h1>
|
||||
<p class="lead my-3">{{ $featured_post->excerpt }}</p>
|
||||
<p class="lead mb-0"><a href="{{ route('front.post', ['slug' => $featured_post->slug]) }}"
|
||||
<p class="lead mb-0"><a href="{{ route('front.post', ['slug' => $featured_post->slug, 'category_slug' => $featured_post->category->slug]) }}"
|
||||
class=" fw-bold">Continue reading...</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user