Illuminate\Routing\Redirector::secure PHP Méthode

secure() public méthode

Create a new redirect response to the given HTTPS path.
public secure ( string $path, integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
Résultat Illuminate\Http\RedirectResponse
    public function secure($path, $status = 302, $headers = [])
    {
        return $this->to($path, $status, $headers, true);
    }

Usage Example

Exemple #1
0
 /**
  * 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
 }
All Usage Examples Of Illuminate\Routing\Redirector::secure