<?php

namespace App\Concerns;

use App\Enums\Role;

trait HasRoleChecks
{
    public static function hasAnyRole(array $roles): bool
    {
        return auth()->user()->hasAnyRole(
            array_map(fn (Role $role) => $role->value, $roles)
        );
    }
}
