protected function resolveWhenCollections(array $collections = [])
    {
        foreach ($collections as $index => $collection) {
            if ($this->getMatcher()->matchWhen($collection['uri'])) {

                // registering when tag
                RouteCollector::$firing['when'] = $collection['uri'];
                app()->call($collection['action'], [app('route')]);

                RouteCollector::removeWhen($index);
                break;
            }
        }

        return RouteCollector::getRoutes();
    }
protected function resolveWhenCollections(array $collections = [])
    {
        foreach ($collections as $index => $collection) {
            if ($this->getMatcher()->matchWhen($collection['uri'])) {

                // registering when tag
                RouteCollector::$firing['when'] = $collection['uri'];
                app()->call($collection['action'], [app('route')]);

                RouteCollector::removeWhen($index);
                break;
            }
        }

        return RouteCollector::getRoutes();
    }
protected function resolveWhenCollections ( array $ collections = [ ] ) { foreach ( $ collections as $ index => $ collection ) { if ( $ this -> getMatcher ( ) -> matchWhen ( $ collection [ 'uri' ] ) ) { // registering when tag RouteCollector :: $ firing [ 'when' ] = $ collection [ 'uri' ] ; app ( ) -> call ( $ collection [ 'action' ] , [ app ( 'route' ) ] ) ; RouteCollector :: removeWhen ( $ index ) ; break ; } } return RouteCollector :: getRoutes ( ) ; }
resolve when collections

@param array $collections
@return array
resolve when collections