Skip to content

Commit 21ac84b

Browse files
committed
wip
1 parent 7fa064d commit 21ac84b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/Http/Requests/CreateReplyRequest.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ public function replyAble(): ReplyAble
3434

3535
private function findReplyAble(int $id, string $type): ReplyAble
3636
{
37-
$result = match ($type) {
38-
Thread::TABLE => Thread::find($id),
37+
return match ($type) {
38+
Thread::TABLE => Thread::findOrFail($id),
39+
default => abort(404),
3940
};
40-
41-
return $result ?? abort(404);
4241
}
4342

4443
public function author(): User

0 commit comments

Comments
 (0)