public function routes($routes) {
        foreach($routes as $route => $controllerAction) {
            // if we're dealing with a namespace
            if(is_array($controllerAction)) {

            } else {
                $explodedRoute = explode(' ', $route);
                list($method, $path) = $explodedRoute;

                // If it's a resource it'll register it's own routes
                if($method == 'RESOURCE') {
                    // Resource route registers don't have actions
                    $controller = $controllerAction;

                    // Handle resource controllers
                    require_once app_path("controllers/$controller.php");
                    $routes = $controller::_registerRoutes($this, $path, $controller);
                } else {
                    $explodedAction = explode('@', $controllerAction);
                    list($controller, $action) = $explodedAction;

                    $this->register($method, $path, $controller, $action);
                }
            }
        }
    }
public function routes($routes) {
        foreach($routes as $route => $controllerAction) {
            // if we're dealing with a namespace
            if(is_array($controllerAction)) {

            } else {
                $explodedRoute = explode(' ', $route);
                list($method, $path) = $explodedRoute;

                // If it's a resource it'll register it's own routes
                if($method == 'RESOURCE') {
                    // Resource route registers don't have actions
                    $controller = $controllerAction;

                    // Handle resource controllers
                    require_once app_path("controllers/$controller.php");
                    $routes = $controller::_registerRoutes($this, $path, $controller);
                } else {
                    $explodedAction = explode('@', $controllerAction);
                    list($controller, $action) = $explodedAction;

                    $this->register($method, $path, $controller, $action);
                }
            }
        }
    }
public function routes ( $ routes ) { foreach ( $ routes as $ route => $ controllerAction ) { // if we're dealing with a namespace if ( is_array ( $ controllerAction ) ) { } else { $ explodedRoute = explode ( ' ' , $ route ) ; list ( $ method , $ path ) = $ explodedRoute ; // If it's a resource it'll register it's own routes if ( $ method == 'RESOURCE' ) { // Resource route registers don't have actions $ controller = $ controllerAction ; // Handle resource controllers require_once app_path ( "controllers/$controller.php" ) ; $ routes = $ controller :: _registerRoutes ( $ this , $ path , $ controller ) ; } else { $ explodedAction = explode ( '@' , $ controllerAction ) ; list ( $ controller , $ action ) = $ explodedAction ; $ this -> register ( $ method , $ path , $ controller , $ action ) ; } } } }
Route out our routes

@param $routes
Route out our routes