<?php

namespace App\Traits;

trait WithAuthorization
{
    public function canOrAbort(string $ability, $model = null)
    {
        if (auth()->user()->cannot($ability, $model)) {
            abort(403);
        }
    }
}
