components([ Section::make('Bestandteile')->description('Was diese Fassung direkt enthält.')->schema([ TextEntry::make('parts')->hiddenLabel()->listWithLineBreaks() ->state(fn (Bundle $record): array => app(CatalogReading::class)->bundleParts($record)), ]), Section::make('Aufgelöste Lizenzartikel')->description('Darauf werden beim Erwerb die Berechtigungen vergeben.')->schema([ TextEntry::make('articles')->hiddenLabel()->listWithLineBreaks() ->state(fn (Bundle $record): array => app(CatalogReading::class)->bundleArticles($record)), ]), ]); } public static function form(Schema $schema): Schema { return $schema; } public static function table(Table $table): Table { return $table->columns([ TextColumn::make('name')->label('Name')->searchable(), TextColumn::make('versions_count')->counts('versions')->label('Fassungen'), ]); } public static function getPages(): array { return [ 'index' => ListBundles::route('/'), 'view' => ViewBundle::route('/{record}'), ]; } }