TIP 48 / 100

Abort If Condition Failed.

abort_if() can be used as shorter way to check condition and throw an error page.

php
$product = Product::findOrFail($id);
if($product->user_id != auth()->user()->id){
    abort(403);
}

Shorter way

php
/* abort_if(CONDITION, ERROR_CODE) */
$product = Product::findOrFail($id);
abort_if ($product->user_id != auth()->user()->id, 403)