You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think URL the class should have a method to add a global suffix to the URLs it generate. For example: we running an old system that should keep the suffix (.html) in the URL and we have to add it through controllers but if we implement this method it will allow us to add/remove the global suffix based on the app config.
Currently, we make a workaround by extending the URL class:
`
private $suffix;
public function get($uri = null, $args = null, bool $local = null, $baseUri = null): string
{
return parent::get($uri, $args, $local, $baseUri) . $this->suffix;
}
public function getSuffix(): string
{
return $this->suffix;
}
public function setSuffix(string $suffix)
{
$this->suffix = $suffix;
}
public function removeSuffix()
{
$this->setSuffix(null);
}
`
Also, it would be good to allow to override the staticBaseUri in the method getStatic by passing it as a second parameter which will allow us to easily change the base URI for some of the assets without the need to change the global config.
The text was updated successfully, but these errors were encountered:
Hello,
I think URL the class should have a method to add a global suffix to the URLs it generate. For example: we running an old system that should keep the suffix (.html) in the URL and we have to add it through controllers but if we implement this method it will allow us to add/remove the global suffix based on the app config.
Currently, we make a workaround by extending the URL class:
`
private $suffix;
`
Also, it would be good to allow to override the staticBaseUri in the method getStatic by passing it as a second parameter which will allow us to easily change the base URI for some of the assets without the need to change the global config.
The text was updated successfully, but these errors were encountered: