From 8c7768276412d4783b3db90ce6265dabcc01db94 Mon Sep 17 00:00:00 2001 From: Charles Teh Date: Wed, 4 Oct 2023 21:17:56 +0800 Subject: [PATCH] Update (post): Fix broken routes --- app/Jobs/Tasks/PublishIndexPostTask.php | 2 +- resources/views/front/partials/post_detail.blade.php | 2 +- resources/views/front/welcome.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Tasks/PublishIndexPostTask.php b/app/Jobs/Tasks/PublishIndexPostTask.php index 7228225..22abab6 100644 --- a/app/Jobs/Tasks/PublishIndexPostTask.php +++ b/app/Jobs/Tasks/PublishIndexPostTask.php @@ -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); diff --git a/resources/views/front/partials/post_detail.blade.php b/resources/views/front/partials/post_detail.blade.php index ea2eb4b..15ac253 100644 --- a/resources/views/front/partials/post_detail.blade.php +++ b/resources/views/front/partials/post_detail.blade.php @@ -10,7 +10,7 @@
{{ $post->published_at->format('M j') }}
@endif

{{ $post->excerpt }}

- Continue reading diff --git a/resources/views/front/welcome.blade.php b/resources/views/front/welcome.blade.php index fd040d5..34bb324 100644 --- a/resources/views/front/welcome.blade.php +++ b/resources/views/front/welcome.blade.php @@ -6,7 +6,7 @@

{{ $featured_post->title }}

{{ $featured_post->excerpt }}

-

Continue reading...