简体   繁体   English

Javascript window.open() 但在 Laravel 中

[英]Javascript window.open() but in Laravel

Im developing a website where, in a given moment, i need to redirect the user to an url passing a '_system' parameter.我正在开发一个网站,在某个特定时刻,我需要将用户重定向到一个传递'_system'参数的 url。 I know this in javaScript is something like window.open('xxx.com', '_system') , but i wanna know if there is way to do this using Laravel and its redirect() response helper and how to do that.我知道这在 javaScript 中类似于window.open('xxx.com', '_system') ,但我想知道是否有办法使用 Laravel 及其redirect()响应助手来做到这一点以及如何做到这一点。

You can just pass the external url into the redirect() method and it will redirect to that url.您可以将外部 url 传递给redirect()方法,它会重定向到该 url。

For example: return redirect('https://www.google.com');例如: return redirect('https://www.google.com');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM