public function registerRoute($uri, $action)
    {
        /** Register this route for every port available */
        if ($this->globally) {
            $ports = Hub::ports()->merge(new Port);
        } else {
            $ports = collect([$this->port]);
        }

        $ports->map(function ($port) use ($action, $uri) {
            $this->routes->push(
                Action::make($uri, $action)
                      ->port($port)
                      ->build()
                      ->register($this->router)
            );
        });

        return $this->routes;
    }
public function registerRoute($uri, $action)
    {
        /** Register this route for every port available */
        if ($this->globally) {
            $ports = Hub::ports()->merge(new Port);
        } else {
            $ports = collect([$this->port]);
        }

        $ports->map(function ($port) use ($action, $uri) {
            $this->routes->push(
                Action::make($uri, $action)
                      ->port($port)
                      ->build()
                      ->register($this->router)
            );
        });

        return $this->routes;
    }
public function registerRoute ( $ uri , $ action ) { /** Register this route for every port available */ if ( $ this -> globally ) { $ ports = Hub :: ports ( ) -> merge ( new Port ) ; } else { $ ports = collect ( [ $ this -> port ] ) ; } $ ports -> map ( function ( $ port ) use ( $ action , $ uri ) { $ this -> routes -> push ( Action :: make ( $ uri , $ action ) -> port ( $ port ) -> build ( ) -> register ( $ this -> router ) ) ; } ) ; return $ this -> routes ; }
Register a route

@param $uri
@param $action
@return \Illuminate\Support\Collection
Register a route