Class LaravelUi5\Core\Attributes\Role

Declares a semantic role within the LaravelUi5 domain model.

A Role groups Abilities into a conceptual responsibility, such as "Accountant" or "Project Manager". Roles are global and context-independent — they describe what a user represents, not where the role applies.

Contextual assignments (e.g. "Anna is Project Manager in Project A") are handled at the group or policy layer, not by the role itself.

Example:

#[Role('Accountant', 'Responsible for financial postings and reporting.')]
class AccountingModule {}

Roles are typically referenced by Ability or Group assignments but do not directly enforce access restrictions. They serve as descriptive metadata to organize responsibilities across modules.

Located at Attributes/Role.php
Methods
Properties