如何使用 Laravel 5 url() blade 助手提供 https 链接
How to serve https links with Laravel 5 url() blade helper
我正在寻找一种通过 blade 文件中的 url()
帮助程序来服务器安全链接的方法。
就像您有 assets
和 assets_secure
,是否有任何选项或方法可以通过此助手仅提供 https?
它在我的应用程序中有上百万个位置,如果能找到一种方法来提供这些链接真的很棒,但仍然使用 https。
在laravel 5.3有secure_url()
The secure_url
function generates a fully qualified HTTPS URL to the
given path:
echo secure_url('user/profile');
echo secure_url('user/profile', [1]);
我正在寻找一种通过 blade 文件中的 url()
帮助程序来服务器安全链接的方法。
就像您有 assets
和 assets_secure
,是否有任何选项或方法可以通过此助手仅提供 https?
它在我的应用程序中有上百万个位置,如果能找到一种方法来提供这些链接真的很棒,但仍然使用 https。
在laravel 5.3有secure_url()
The
secure_url
function generates a fully qualified HTTPS URL to the given path:
echo secure_url('user/profile');
echo secure_url('user/profile', [1]);