Custom page

After creating data using reource need to redirect to a custom page with created record id, how to get that id through route.. in getgaes of resource i added like this public static function getPages(): array { return [ 'details' => Pages\VehicleDetails::route('/details'), ]; }, in createpage i added protected function getRedirectUrl(): string { return $this->getResource()::getUrl('details'); }
2 Replies
Dennis Koch
Dennis Koch2y ago
- VehicleDetailsneeds to have a public $record property. - The route needs to have a placeholder: 'details' => Pages\VehicleDetails::route('/details/{record}'), - I think you can access $this->record for the URL: $this->getResource()::getUrl('details', ['record' => $this->record]);
Roshan_k
Roshan_kOP2y ago
okay, Thank you.

Did you find this page helpful?