Refactoring the redirect class.
This commit is contained in:
parent
bad119a48b
commit
3f35bb1591
|
@ -77,13 +77,11 @@ public static function __callStatic($method, $parameters)
|
|||
{
|
||||
$parameters = (isset($parameters[0])) ? $parameters[0] : array();
|
||||
|
||||
// Dynamically redirect to a secure route URL.
|
||||
if (strpos($method, 'to_secure_') === 0)
|
||||
{
|
||||
return static::to(URL::to_route(substr($method, 10), $parameters, true));
|
||||
}
|
||||
|
||||
// Dynamically redirect a route URL.
|
||||
if (strpos($method, 'to_') === 0)
|
||||
{
|
||||
return static::to(URL::to_route(substr($method, 3), $parameters));
|
||||
|
|
Loading…
Reference in New Issue