protected function generateLink($route, $params = null)
    {
        if ($route instanceof Closure) {
            // Have to stringify this before calling Route::has because it will
            // Fail if we don't pass a string in
            $route = $this->stringify($route);
        }
        if (\Route::has($route)) {
            // If params is empty, just don't call it...
            if (empty($params)) {
                return route($this->routify($route));
            } else { // Since $params isn't empty and $route is a Route, just paramify both.
                return route($this->routify($route), $this->routeparamify($params));
            }
        }

        if (empty($params)) {
            return url($this->routify($route));
        } else {
            // Since $params isn't empty and $route is not Route, just paramify both anyway.
            return url($this->routify($route), $this->routeparamify($params));
        }
    }
protected function generateLink($route, $params = null)
    {
        if ($route instanceof Closure) {
            // Have to stringify this before calling Route::has because it will
            // Fail if we don't pass a string in
            $route = $this->stringify($route);
        }
        if (\Route::has($route)) {
            // If params is empty, just don't call it...
            if (empty($params)) {
                return route($this->routify($route));
            } else { // Since $params isn't empty and $route is a Route, just paramify both.
                return route($this->routify($route), $this->routeparamify($params));
            }
        }

        if (empty($params)) {
            return url($this->routify($route));
        } else {
            // Since $params isn't empty and $route is not Route, just paramify both anyway.
            return url($this->routify($route), $this->routeparamify($params));
        }
    }
protected function generateLink ( $ route , $ params = null ) { if ( $ route instanceof Closure ) { // Have to stringify this before calling Route::has because it will // Fail if we don't pass a string in $ route = $ this -> stringify ( $ route ) ; } if ( \ Route :: has ( $ route ) ) { // If params is empty, just don't call it... if ( empty ( $ params ) ) { return route ( $ this -> routify ( $ route ) ) ; } else { // Since $params isn't empty and $route is a Route, just paramify both. return route ( $ this -> routify ( $ route ) , $ this -> routeparamify ( $ params ) ) ; } } if ( empty ( $ params ) ) { return url ( $ this -> routify ( $ route ) ) ; } else { // Since $params isn't empty and $route is not Route, just paramify both anyway. return url ( $ this -> routify ( $ route ) , $ this -> routeparamify ( $ params ) ) ; } }
This will generate a url relating to the given route, whether that is
from a raw url or if it is a route. It will also grab the params for
the values.

@param string $route
@param mixed  $params

@return string
This will generate a url relating to the given route whether that is from a raw url or if it is a route . It will also grab the params for the values .