Skip to content

Commit

Permalink
[7.x] allow to reset forced scheme and root-url (#34039)
Browse files Browse the repository at this point in the history
* allow to reset forced scheme and root-url

* fix StyleCI
  • Loading branch information
Gummibeer committed Aug 28, 2020
1 parent 6891cb5 commit 6dd25f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Routing/UrlGenerator.php
Expand Up @@ -616,25 +616,25 @@ public function getDefaultParameters()
/**
* Force the scheme for URLs.
*
* @param string $scheme
* @param string|null $scheme
* @return void
*/
public function forceScheme($scheme)
{
$this->cachedScheme = null;

$this->forceScheme = $scheme.'://';
$this->forceScheme = $scheme ? $scheme.'://' : null;
}

/**
* Set the forced root URL.
*
* @param string $root
* @param string|null $root
* @return void
*/
public function forceRootUrl($root)
{
$this->forcedRoot = rtrim($root, '/');
$this->forcedRoot = $root ? rtrim($root, '/') : null;

$this->cachedRoot = null;
}
Expand Down

0 comments on commit 6dd25f4

Please sign in to comment.