Skip to content
Discussion options

You must be logged in to vote

Looks like I should use this function firstOr:

User::where('email', '[email protected]')->firstOr(
  callback: fn () => throw new NotFoundHttpException(),
);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shaedrich
Comment options

Answer selected by albertcito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants