user()?->can('admin') ?? false; } protected static ?string $model = Role::class; protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-user-group'; protected static string | \UnitEnum | null $navigationGroup = 'Ustawienia'; protected static ?string $pluralModelLabel = 'Role'; protected static ?string $modelLabel = 'Role'; protected static ?int $navigationSort = 3; protected static ?string $recordTitleAttribute = 'Role'; public static function form(Schema $schema): Schema { return RoleForm::configure($schema); } public static function infolist(Schema $schema): Schema { return RoleInfolist::configure($schema); } public static function table(Table $table): Table { return RolesTable::configure($table); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => ListRoles::route('/'), 'create' => CreateRole::route('/create'), 'edit' => EditRole::route('/{record}/edit'), ]; } public static function shouldRegister(): bool { return auth()->user()?->can('edit_users') ?? false; } }