schema([ Forms\Components\TextInput::make('name') ->label('Name') ->required(), Forms\Components\Select::make('type') ->label('Type') ->options([ 'ftp' => 'FTP', 'sftp' => 'SFTP', ]) ->default('ftp') ->required(), Forms\Components\TextInput::make('hostname') ->label('Hostname') ->required(), Forms\Components\TextInput::make('port') ->label('Port') ->default('21') ->required(), Forms\Components\TextInput::make('username') ->label('Username') ->required(), Forms\Components\TextInput::make('password') ->label('Password') ->required(), Forms\Components\TextInput::make('path') ->label('Path') ->default('/') ->required(), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('name'), Tables\Columns\TextColumn::make('type')->badge(), Tables\Columns\TextColumn::make('hostname'), Tables\Columns\TextColumn::make('status') ->badge() ->color(fn (string $state): string => match ($state) { 'online' => 'success', 'offline' => 'danger', }) ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListRemoteBackupServers::route('/'), 'create' => Pages\CreateRemoteBackupServer::route('/create'), 'edit' => Pages\EditRemoteBackupServer::route('/{record}/edit'), ]; } }