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