- Added `RestrictedUserPermission` migration and model for managing user-role-permission restrictions. - Introduced `UserService`, `RoleService`, and related DTOs for handling user access, role assignments, and permission restrictions. - Created new Livewire components and Blade views for user management, including role/permission assignment modals. - Updated navigation and routing to include the "Users" section under "Access Manager." - Enhanced `RoleService` with methods for retrieving permissions and managing role-user interactions. - Improved UI with permission toggles and streamlined selection features for better user-role management.
24 lines
638 B
PHP
24 lines
638 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Data\Role;
|
|
|
|
use App\Data\Permissions\PermissionData;
|
|
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,
|
|
#[DataCollectionOf(PermissionData::class)]
|
|
public ?DataCollection $permissions = null,
|
|
) {}
|
|
}
|