return redirect new tap laravel code example
Example 1: laravel return new tab
function show_my_receipt() {
// open the page as popup //
var page = 'http://www.test.com';
var myWindow = window.open(page, "_blank", "scrollbars=yes,width=400,height=500,top=300");
// focus on the popup //
myWindow.focus();
// if you want to close it after some time (like for example open the popup print the receipt and close it) //
// setTimeout(function() {
// myWindow.close();
// }, 1000);
}
Example 2: laravel return new tab
<button type="button" class="btn btn-success" onclick="show_my_receipt()">show the receipt</button>