public function reverse($resource, array $params = [])
    {
        // search in all routes
        if($key = array_search($resource, $this->routes)) {
            $route = $this->routes[$key];
            $route->params = $params;
            return $route;
        }
    }
public function reverse($resource, array $params = [])
    {
        // search in all routes
        if($key = array_search($resource, $this->routes)) {
            $route = $this->routes[$key];
            $route->params = $params;
            return $route;
        }
    }
public function reverse ( $ resource , array $ params = [ ] ) { // search in all routes if ( $ key = array_search ( $ resource , $ this -> routes ) ) { $ route = $ this -> routes [ $ key ] ; $ route -> params = $ params ; return $ route ; } }
Reverse finding by resource

@param $resource
@param array $params
@return Route
Reverse finding by resource