Trying to use findOrFail() instead of get() #34244
Answered
by
HamzaInPerth
HamzaInPerth
asked this question in
General
-
Instead of get() I would like to use findOrFail but it doesn't work that way. So what is the best way to send a 404 response if the row doesn't exist ? Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Answered by
HamzaInPerth
Sep 10, 2020
Replies: 1 comment
-
I've figured it out :
Thx tho. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
HamzaInPerth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've figured it out :
abort_if($log->isEmpty(), 404);
Thx tho.