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 4034664 commit a56c542Copy full SHA for a56c542
src/Http/Actions/Post/PostGetNavigateAction.php
@@ -115,14 +115,13 @@ public function __invoke(string $slug): BaseHttpResponse|JsonResponse|JsonResour
115
->setMessage('Not found');
116
}
117
118
- /** @var Post|Builder|Model $currentPost */
119
$currentPost = Post::query()
120
->where('id', $slugModel->reference_id)
121
->where('status', StatusEnum::PUBLISHED)
122
->with(['categories', 'tags'])
123
->first();
124
125
- if (!$currentPost) {
+ if (!$currentPost || !$currentPost instanceof Post) {
126
return $this
127
->httpResponse()
128
->setError()
0 commit comments