forceSchema() public method

Force the schema for URLs.
public forceSchema ( string $schema ) : void
$schema string
return void
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot(UrlGenerator $url)
 {
     //
     if (env('APP_ENV') !== 'local') {
         $url->forceSchema('https');
     }
 }
Example #2
0
 /**
  * Force the schema for URLs.
  *
  * @param string $schema
  * @return void 
  * @static 
  */
 public static function forceSchema($schema)
 {
     \Illuminate\Routing\UrlGenerator::forceSchema($schema);
 }