schema([ Select::make('tenant_id') ->relationship('tenant', 'name') ->required() ->searchable(), Select::make('package_id') ->relationship('package', 'name') ->required() ->searchable(), DateTimePicker::make('purchased_at'), DateTimePicker::make('expires_at'), Toggle::make('active')->default(true), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('tenant.name')->searchable()->sortable(), TextColumn::make('package.name')->badge()->color('success'), TextColumn::make('purchased_at')->dateTime()->sortable(), TextColumn::make('expires_at')->dateTime()->sortable(), IconColumn::make('active')->boolean(), ]) ->filters([]) ->actions([ ActionGroup::make([ ViewAction::make(), EditAction::make(), DeleteAction::make(), ]), ]) ->bulkActions([ BulkActionGroup::make([ DeleteBulkAction::make(), ]), ]); } public static function getRelations(): array { return []; } public static function getPages(): array { return [ 'index' => Pages\ListTenantPackages::route('/'), 'create' => Pages\CreateTenantPackage::route('/create'), 'view' => Pages\ViewTenantPackage::route('/{record}'), 'edit' => Pages\EditTenantPackage::route('/{record}/edit'), ]; } }