- Added `DefaultUserRole` and permissions enums (`AccessManager`, `Apps`, `Settings`) for centralizing role and permission constants. - Implemented `DashboardRoute` helper to resolve routes dynamically based on user roles. - Introduced seeders for default roles (`DefaultRoleWithPermissionSeeder`, `PermissionSeeder`, `ExampleUserWithRoleSeeder`) with role-permission assignments. - Created `EnumExtractor` utility for parsing enums and generating permissions. - Customized dashboard routes with role-based redirection logic. - Updated sidebar navigation to display role-based menu items with permission checks.
19 lines
342 B
PHP
19 lines
342 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Data\Ui\Sidebar;
|
|
|
|
use BackedEnum;
|
|
use Spatie\LaravelData\Data;
|
|
|
|
final class NavSubItemData extends Data
|
|
{
|
|
public function __construct(
|
|
public string $label,
|
|
public string $route,
|
|
public string $active_pattern,
|
|
public ?BackedEnum $permission = null
|
|
) {}
|
|
}
|