We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25cff98 commit 0fdc693Copy full SHA for 0fdc693
src/Http/Actions/Post/PostGetNavigateAction.php
@@ -113,6 +113,7 @@ public function __invoke(string $slug): BaseHttpResponse|JsonResponse|JsonResour
113
->setMessage('Not found');
114
}
115
116
+ /** @var Post|null $currentPost */
117
$currentPost = Post::query()
118
->where('id', $slugModel->reference_id)
119
->where('status', StatusEnum::PUBLISHED)
@@ -127,6 +128,7 @@ public function __invoke(string $slug): BaseHttpResponse|JsonResponse|JsonResour
127
128
129
130
131
+ // At this point, $currentPost is guaranteed to be a Post instance
132
// Using service method for complex business logic
133
$navigationPosts = $this->postService->getNavigationPosts($currentPost);
134
0 commit comments