首页 > 解决方案 > Javascript window.open() 但在 Laravel

问题描述

我正在开发一个网站,在给定时刻,我需要将用户重定向到传递'_system'参数的 url。我知道这在 javaScript 中是类似的window.open('xxx.com', '_system'),但我想知道是否有办法使用 Laravel 及其redirect()响应助手来做到这一点以及如何做到这一点。

标签: phplaravelredirect

解决方案


您只需将外部 url 传递给该redirect()方法,它将重定向到该 url。

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


推荐阅读