Open in new tab

I have this code
Action::make('Print')
                            ->action(fn ($data, Repair $record) => redirect()->to(
                                route('repair.pdf.'.$data['type'], $record)
                            ))
                            ->icon('heroicon-s-printer')
                            ->form([
                                Forms\Components\Radio::make('type')
                                    ->label('Type')
                                    ->default('regular')
                                    ->options([
                                        'regular' => 'Regular invoice',
                                        'aggregate' => 'Aggregated invoice',
                                        'receipt' => 'Receipt (for the client)',
                                        'label' => 'Label (for the workshop)',
                                        'authorization' => 'Data authorization',
                                    ]),
                            ])

it works perfectly but i need to open the pdf in a new tab
any thoughts?
Was this page helpful?