Skip to content

tryOrAbort abort when an Exception happens #53508

Answered by henzeb
omer-biz asked this question in Ideas
Discussion options

You must be logged in to vote

How about:

rescue(fn() => Socialite::driver($provider)->user(), fn() => abort(404));

https://laravel.com/docs/11.x/helpers#method-rescue

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@omer-biz
Comment options

Answer selected by omer-biz
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