public function to($url, $locale = null, $parameters = [], $secure = null)
    {
        if (is_bool($secure)) {
            $this->urlparser->secure($secure);
        } elseif ($this->forceSecure) {
            $this->urlparser->secure();
        }

        return $this->urlparser->set($url)
            ->localize($this->scope->segment($locale), $this->scope->locales())
            ->parameters($parameters)
            ->get();
    }
public function to($url, $locale = null, $parameters = [], $secure = null)
    {
        if (is_bool($secure)) {
            $this->urlparser->secure($secure);
        } elseif ($this->forceSecure) {
            $this->urlparser->secure();
        }

        return $this->urlparser->set($url)
            ->localize($this->scope->segment($locale), $this->scope->locales())
            ->parameters($parameters)
            ->get();
    }
public function to ( $ url , $ locale = null , $ parameters = [ ] , $ secure = null ) { if ( is_bool ( $ secure ) ) { $ this -> urlparser -> secure ( $ secure ) ; } elseif ( $ this -> forceSecure ) { $ this -> urlparser -> secure ( ) ; } return $ this -> urlparser -> set ( $ url ) -> localize ( $ this -> scope -> segment ( $ locale ) , $ this -> scope -> locales ( ) ) -> parameters ( $ parameters ) -> get ( ) ; }
Generate a localized url.

@param $url
@param null  $locale
@param array $parameters
@param null  $secure

@return mixed
Generate a localized url .