I wanted to open a preview for news in my laravel orchid panel on submitting a form through post. My problem is when users click on preview button the preview is opening on same page but when we press back btn for final submitting the form, the data gets disappeared. So now i m thinking to open the preview on new tab. Anyone can suggest me a better idea to implement will be highly appreciated, I just wanted to show preview but the data should be available on pressing back button which will show thw form page. Thanks in advance
This is my screen
` public function commandBar(): array
{
$buttons[] = Button::make(__('Save'))
->icon('check')
->method('save');
$buttons[] = Button::make('Preview')->id('ddd')
->icon('check')
->method('preview');
return $buttons;
}`
and my preview function
`public function preview(NewsItem $new, Request $request)
{
$newData = $request->get('new');
return redirect()->away(route('platform.news.preview', [
'newData' => $newData,
]))->with('_blank'); // _blank does not works
}`
I tried to redirect with ->with('_blank') but it doesnt worked