public function getAllKeysRoutes()
    {
        $routeCollection = \Route::getRoutes();

        $routes = collect($routeCollection)->map(function($item){
            return explode('/', $item->getPrefix());
        })->values()->collapse()->filter(function($item, $key){
            return $item !== '';
        })->groupBy(function($item){
            return $item;
        })->keys()->all();

        return $routes;
    }
public function getAllKeysRoutes()
    {
        $routeCollection = \Route::getRoutes();

        $routes = collect($routeCollection)->map(function($item){
            return explode('/', $item->getPrefix());
        })->values()->collapse()->filter(function($item, $key){
            return $item !== '';
        })->groupBy(function($item){
            return $item;
        })->keys()->all();

        return $routes;
    }
public function getAllKeysRoutes ( ) { $ routeCollection = \ Route :: getRoutes ( ) ; $ routes = collect ( $ routeCollection ) -> map ( function ( $ item ) { return explode ( '/' , $ item -> getPrefix ( ) ) ; } ) -> values ( ) -> collapse ( ) -> filter ( function ( $ item , $ key ) { return $ item !== '' ; } ) -> groupBy ( function ( $ item ) { return $ item ; } ) -> keys ( ) -> all ( ) ; return $ routes ; }
Get all keys of routes
@return array
Get all keys of routes