src/Direct/Api.php
protected function getRouteActions($routes)
    {
        $actions = array();

        // iterate for all routes
        foreach ($routes->all() as $route){

            // if route is post and is direct exposed
            if (in_array('POST', $route->getMethods()) == true && $route->isDirect()){
                $apiParts = $this->getRouteApiParts($route);

                if ($apiParts['exposed']){
                    $path = $apiParts['path'];
                    unset($apiParts['path']);
                    unset($apiParts['exposed']);

                    $actions[$path][] = $apiParts;
                }
            }

        }

        return $actions;
    }
protected function getRouteActions($routes)
    {
        $actions = array();

        // iterate for all routes
        foreach ($routes->all() as $route){

            // if route is post and is direct exposed
            if (in_array('POST', $route->getMethods()) == true && $route->isDirect()){
                $apiParts = $this->getRouteApiParts($route);

                if ($apiParts['exposed']){
                    $path = $apiParts['path'];
                    unset($apiParts['path']);
                    unset($apiParts['exposed']);

                    $actions[$path][] = $apiParts;
                }
            }

        }

        return $actions;
    }
protected function getRouteActions ( $ routes ) { $ actions = array ( ) ; // iterate for all routes foreach ( $ routes -> all ( ) as $ route ) { // if route is post and is direct exposed if ( in_array ( 'POST' , $ route -> getMethods ( ) ) == true && $ route -> isDirect ( ) ) { $ apiParts = $ this -> getRouteApiParts ( $ route ) ; if ( $ apiParts [ 'exposed' ] ) { $ path = $ apiParts [ 'path' ] ; unset ( $ apiParts [ 'path' ] ) ; unset ( $ apiParts [ 'exposed' ] ) ; $ actions [ $ path ] [ ] = $ apiParts ; } } } return $ actions ; }
Get the route API definition

@param array
@return array Controllers list
Get the route API definition