Laravel redirect to new tab

I need to open a new url after submit request. I did this at the end of my controller.

Redirect::away($url)

The above calls work just fine, however I want to open the url in a new tab .

I tried, away, and conceived the methods that are in the laravel document. Nothing works as intended.

+4
source share
2 answers

Redirect::away()or Redirect:to()both are server-side commands, and all they do is redirect to the URL with a little difference, as indicated in this thread p>

Like both server-side commands, they cannot open a new tab.

, : <a href="#" target="_blank">Open in a new tab</a>

+10

, , / ,

echo "<script>window.open('".$url."', '_blank')</script>";

, .

0

Source: https://habr.com/ru/post/1617398/


All Articles