schema([ Forms\Components\TextInput::make('name') ->label('Name') ->required() ->maxLength(255) ->unique(ignoreRecord: true) ->live(onBlur: true), Forms\Components\TextInput::make('network_interface') ->label('Network Interface') ->required() ->maxLength(255) ->helperText('The network interface to use for this IP pool, e.g., vmbr0'), Forms\Components\TextInput::make('mtu') ->label('MTU') ->numeric() ->default(1500) ->required() ->helperText('The MTU (Maximum Transmission Unit) for the network interface, default is 1500'), Forms\Components\Select::make('nodes') ->label('Nodes') ->multiple() ->preload() ->relationship('nodes', 'notes'), Forms\Components\TextInput::make('vlan') ->label('VLAN') ->numeric() ->nullable(), Forms\Components\Toggle::make('firewall') ->label('Enable Firewall') ->default(false) ->helperText('Enable or disable the firewall for this IP pool'), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('name'), Tables\Columns\TextColumn::make('nodes_count') ->label('Nodes') ->counts('nodes'), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]); } public static function getRelations(): array { return [ RelationManagers\IPAddressRelationManager::class, ]; } public static function getPages(): array { return [ 'index' => Pages\ListIPPools::route('/'), 'create' => Pages\CreateIPPool::route('/create'), 'edit' => Pages\EditIPPool::route('/{record}/edit'), ]; } }