How to redirect without making a full page request?

Panel uses
spa()


class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->spa();
    }
}


In my
PostResource
's $form I have a custom action which redirects to the table.

Action::make('publish')
    ->action(function ($record) {
        
        $record->publish();
        
        return redirect(self::getUrl('index'));
    })


Does Filament have its own redirect method which doesn't break the SPA UX?
Was this page helpful?