© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago
howdu

Replicate action with success redirect

This doesn't work because
replica
replica
is a protected property but it needs to be set for the
successRedirectUrl
successRedirectUrl
to evaluate it.
ReplicateAction::make()
    ->using(function ($action, Product $record): Product {
        $action->replica = $record->customRelpicate();
        return $action->replica;
    })
    ->successRedirectUrl(
        fn (Product $replica): string => ProductResource::getUrl('edit', ['record' => $replica])
    )
ReplicateAction::make()
    ->using(function ($action, Product $record): Product {
        $action->replica = $record->customRelpicate();
        return $action->replica;
    })
    ->successRedirectUrl(
        fn (Product $replica): string => ProductResource::getUrl('edit', ['record' => $replica])
    )
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Replicate action
FilamentFFilament / ❓┊help
2y ago
Replicate action with custom after logic
FilamentFFilament / ❓┊help
4mo ago
Redirect with ->url() with bulk action?
FilamentFFilament / ❓┊help
2y ago
Replicate Action updating cloned record
FilamentFFilament / ❓┊help
2y ago