= 5a593ffdb5 Feat: assign users to role and show users on list
- Added DTOs (`AssignUsersToRoleData`, `RoleUserData`, `UserSelectData`) for user-role operations and UI data mapping.
- Updated `RoleService` and `AppRoleService` with methods for user-role assignment, detachment, retrieval, and search.
- Enhanced Blade views and Livewire components to support user-role management in "Roles and Apps."
- Adjusted `Role`, `User`, and related models to incorporate Spatie roles and permissions support.
- Improved UI with search and selection capabilities for assigning users to roles.
2026-05-19 12:24:42 +00:00

21 lines
494 B
PHP

<?php
declare(strict_types=1);
namespace App\Data\Role;
use Spatie\LaravelData\Attributes\DataCollectionOf;
use Spatie\LaravelData\{Data, DataCollection};
final class RoleData extends Data
{
public function __construct(
public int $id,
public string $name,
#[DataCollectionOf(class: RoleAppData::class)]
public ?DataCollection $apps = null,
#[DataCollectionOf(class: RoleUserData::class)]
public ?DataCollection $users = null,
) {}
}