/** * Force to use https:// requests * * @return null|RedirectResponse Redirects to the https:// protocol if the current request is insecure */ public function forceSSL() { if (!$this->request->secure()) { return $this->redirect->secure($this->request->getRequestUri()); } return null; // The request is already secure }
/** * Create a new redirect response to the given HTTPS path. * * @param string $path * @param int $status * @param array $headers * @return \Illuminate\Http\RedirectResponse * @static */ public static function secure($path, $status = 302, $headers = array()) { return \Illuminate\Routing\Redirector::secure($path, $status, $headers); }