Request::secure PHP Method

secure() public static method

Determine if the request is over HTTPS.
public static secure ( ) : boolean
return boolean
        public static function secure()
        {
            return \Illuminate\Http\Request::secure();
        }

Usage Example

 /**
  * Displays the form for account creation
  *
  */
 public function create()
 {
     if (!\Request::secure() && !Utils::isNinjaDev()) {
         Session::flash('warning', trans('texts.enable_https'));
     }
     $account = Auth::user()->account;
     $accountGatewaysIds = $account->gatewayIds();
     $otherProviders = Input::get('other_providers');
     if (!Utils::isNinja() || !env('WEPAY_CLIENT_ID') || Gateway::hasStandardGateway($accountGatewaysIds)) {
         $otherProviders = true;
     }
     $data = self::getViewModel();
     $data['url'] = 'gateways';
     $data['method'] = 'POST';
     $data['title'] = trans('texts.add_gateway');
     if ($otherProviders) {
         $availableGatewaysIds = $account->availableGatewaysIds();
         $data['primaryGateways'] = Gateway::primary($availableGatewaysIds)->orderBy('name', 'desc')->get();
         $data['secondaryGateways'] = Gateway::secondary($availableGatewaysIds)->orderBy('name')->get();
         $data['hiddenFields'] = Gateway::$hiddenFields;
         return View::make('accounts.account_gateway', $data);
     } else {
         return View::make('accounts.account_gateway_wepay', $data);
     }
 }
All Usage Examples Of Request::secure