schema([ Forms\Components\Section::make('Printer Information')->columns(2) ->schema([ Forms\Components\TextInput::make('name'), Forms\Components\Select::make('printer_type')->options([ 'klippy' => 'Klippy', ]), Forms\Components\Select::make('driver')->options([ 'moonraker' => 'Moonraker', 'octaprint' => 'Octaprint', ]), Forms\Components\Section::make('Config')->columns(3)->schema([ Forms\Components\TextInput::make('config.host')->label("Host"), Forms\Components\TextInput::make('config.port')->label("Port")->type('number'), Forms\Components\TextInput::make('config.ssl_port')->label('SSL Port')->type('number'), Forms\Components\TextInput::make('config.max_upload_size')->label('Max Upload Size')->type('number'), ]), Forms\Components\Toggle::make('config.enable_debug_logging')->label('Enable Debug Logging'), ]), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('name') ->sortable() ->searchable(), Tables\Columns\TextColumn::make('printer_type') ->sortable(), Tables\Columns\TextColumn::make('driver') ->sortable(), Tables\Columns\TextColumn::make('config') ->sortable() ->label('network') ->formatStateUsing(function ($state) { return $state->networkFormat(); }), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } public static function getRelations(): array { return [ // ]; } protected function shouldPersistTableSortInSession(): bool { return true; } public static function getPages(): array { return [ 'index' => Pages\ListPrinters::route('/'), 'create' => Pages\CreatePrinter::route('/create'), 'edit' => Pages\EditPrinter::route('/{record}/edit'), ]; } }