public function toRoute($name, array $args = [], $code = 307)
    {
        $to = $this->getRoute($name, $args);

        header("location: {$to}", true, $code);
        exit;
    }
public function toRoute($name, array $args = [], $code = 307)
    {
        $to = $this->getRoute($name, $args);

        header("location: {$to}", true, $code);
        exit;
    }
public function toRoute ( $ name , array $ args = [ ] , $ code = 307 ) { $ to = $ this -> getRoute ( $ name , $ args ) ; header ( "location: {$to}" , true , $ code ) ; exit ; }
Redirect to a route

@param  string  $name
@param  array   $args
@param  int     $code

@return $this
Redirect to a route