Open a Edit Page from Widgets through Dashboard View

I'm trying to open the selected data from a Dashboard to the Edit page of the fetched data . I've been trying to use the following, but not pretty sure how do i do it:
protected function getTableActions(): array
{
return [
Tables\Actions\EditAction::make()
->url(route(/**not sure*/))
];

}
protected function getTableActions(): array
{
return [
Tables\Actions\EditAction::make()
->url(route(/**not sure*/))
];

}
i do also think that we might be able to call the routes just from the Resource pages as it has already pre-defined:
public static function getPages(): array
{
return [
'index' => Pages\ListTradingprofiles::route('/'),
'create' => Pages\CreateTradingprofiles::route('/create'),
'edit' => Pages\EditTradingprofiles::route('/{record}/edit'),
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListTradingprofiles::route('/'),
'create' => Pages\CreateTradingprofiles::route('/create'),
'edit' => Pages\EditTradingprofiles::route('/{record}/edit'),
];
}
couldn't get my fingers around on how to do it . Been looking into google and documentations too
2 Replies
alcmz
alcmzOP2y ago
for the time being i did a work around by define them inside web.php , but would love to know if we can just only use the getPages() instead.
awcodes
awcodes2y ago
ModelResource::getUrl(‘edit’, [params])
Want results from more Discord servers?
Add your server