schema([ Forms\Components\Card::make() ->schema([ Select::make('news_id') ->relationship('news', 'title') ->required(), TextInput::make('title') ->required() ->maxLength(255), RichEditor::make('message') ->required() ->columnSpanFull(), TextInput::make('author_name') ->label('Author Name (Optional)') ->maxLength(255), ]) ->columns(2), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('news.title') ->label('News Article') ->searchable() ->sortable(), Tables\Columns\TextColumn::make('title') ->searchable() ->sortable(), Tables\Columns\TextColumn::make('author_name') ->label('Author') ->searchable() ->sortable(), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), Tables\Actions\DeleteAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListComments::route('/'), 'create' => Pages\CreateComment::route('/create'), 'edit' => Pages\EditComment::route('/{record}/edit'), ]; } }