Replicating and successRedirectUrl

Hello, I enabled multi-tenancy and I am trying to redirect to the edit form after replicating a record, I listed the routes and the one I need looks like this: GET|HEAD company/{tenant}/business-hours/{record}/edit ..................................................................................... filament.company.resources.business-hours.edit I'd beed trying to redirect to the edit form using this piece of code: ->successRedirectUrl(fn($replica) => route('business-hours.edit', ['business-hours' => $replica->id])), But I'm getting a Route not defined, Help please.
1 Reply
nuovo2023
nuovo20232mo ago
I found the solution, for future references purposes, it is something like this: ->successRedirectUrl(fn($replica) => route('filament.company.resources.business-hours.edit', [ 'tenant' => $replica->company_id, 'record' => $replica->id ])),
Want results from more Discord servers?
Add your server