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 7fa064d commit 21ac84bCopy full SHA for 21ac84b
app/Http/Requests/CreateReplyRequest.php
@@ -34,11 +34,10 @@ public function replyAble(): ReplyAble
34
35
private function findReplyAble(int $id, string $type): ReplyAble
36
{
37
- $result = match ($type) {
38
- Thread::TABLE => Thread::find($id),
+ return match ($type) {
+ Thread::TABLE => Thread::findOrFail($id),
39
+ default => abort(404),
40
};
-
41
- return $result ?? abort(404);
42
}
43
44
public function author(): User
0 commit comments