abort unless
The abort unless function throws back a specified HTTP exception if the first attribute evaluates to false.
abort_if(auth()->id(), 403, "Unauthorized");
copy
The abort unless function throws back a specified HTTP exception if the first attribute evaluates to false.
abort_if(auth()->id(), 403, "Unauthorized");
copy