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 Koch17mo 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_kOP17mo ago
okay, Thank you.
Want results from more Discord servers?
Add your server