LoginSignup
1

More than 5 years have passed since last update.

posted at

SSLでLaravel5.1のヘルパー関数 url() を使う

概略

L5のヘルパー関数 url()をSSL(https)上に設定されたページで使うときのメモ

  • Apache & SSL : 自動的にURLが"https://"に設定される
  • nginx & FastCGI & SSL : 自動的にURLが"https://"に設定されない

nginx & FastCGI & SSLでURL()を"https://"したい

example.php
echo url('foo/bar', $parameters = [], $secure = null);

ヘルパー関数 url()には、引数$secureがあるので、TRUEを設定する。

参照

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
1