- 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.
17 lines
266 B
PHP
17 lines
266 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Data\Role;
|
|
|
|
use Spatie\LaravelData\Data;
|
|
|
|
final class AssignUsersToRoleData extends Data
|
|
{
|
|
public function __construct(
|
|
public int $roleId,
|
|
/** @var int[] */
|
|
public array $userIds
|
|
) {}
|
|
}
|