Call to undefined method Modules\MyModule\Filament\Resources\QuestionChartResource::getUrl()

Hello everyone, inside a RelationManager, in my table, I inserted the following custom action: ->actions([ Tables\Actions\EditAction::make(), Tables\Actions\Action::make('regenImg2') ->label('regenerate2') ->icon('heroicon-o-arrow-path') ->url(fn ($record): string => QuestionChartResource::getUrl('regen-img-2', ['record' => $record, ...self::$route_params])), ]) as per this paragraph, https://filamentphp.com/docs/3.x/panels/resources/getting-started#generating-urls-to-resource-pages but it gives me the error "Call to undefined method Modules\MyModule\Filament\Resources\QuestionChartResource::getUrl()" suggestions on what I'm doing wrong? Thanks in advance
1 Reply
bwurtz999
bwurtz99915mo ago
from the docs, it looks like the first argument of the getUrl function should either be null, create, or edit. Or if you generated a custom page, the name of that custom page Is regen-img-2 the name of a custom page you created? if not, it could just be an unhelpful error message and the real problem might be that you need to use edit also - I don't think this ...self::$route_params can go in the getUrl function
Want results from more Discord servers?
Add your server