public function all()
    {
        $regex = '/'.
            '(_|^)'.
            '(get|post|put|delete|patch|head|options|mkcol|propfind|proppatch|lock|unlock|move|copy|link|unlink)_'. // allowed http methods
            '/i';

        $routes = parent::all();
        $customMethodRoutes = [];
        foreach ($routes as $routeName => $route) {
            if (!preg_match($regex, $routeName)) {
                $customMethodRoutes[$routeName] = $route;
                unset($routes[$routeName]);
            }
        }

        return $customMethodRoutes + $routes;
    }
public function all()
    {
        $regex = '/'.
            '(_|^)'.
            '(get|post|put|delete|patch|head|options|mkcol|propfind|proppatch|lock|unlock|move|copy|link|unlink)_'. // allowed http methods
            '/i';

        $routes = parent::all();
        $customMethodRoutes = [];
        foreach ($routes as $routeName => $route) {
            if (!preg_match($regex, $routeName)) {
                $customMethodRoutes[$routeName] = $route;
                unset($routes[$routeName]);
            }
        }

        return $customMethodRoutes + $routes;
    }
public function all ( ) { $ regex = '/' . '(_|^)' . '(get|post|put|delete|patch|head|options|mkcol|propfind|proppatch|lock|unlock|move|copy|link|unlink)_' . // allowed http methods '/i' ; $ routes = parent :: all ( ) ; $ customMethodRoutes = [ ] ; foreach ( $ routes as $ routeName => $ route ) { if ( ! preg_match ( $ regex , $ routeName ) ) { $ customMethodRoutes [ $ routeName ] = $ route ; unset ( $ routes [ $ routeName ] ) ; } } return $ customMethodRoutes + $ routes ; }
Returns routes sorted by custom HTTP methods first.

@return array
Returns routes sorted by custom HTTP methods first .