Skip to content

Ability to use custom Router provider #42

Open
@trinvh

Description

@trinvh

Currently this package get all routes by calling default laravel router. Please add an ability to use custom class to get routes.

Typically we will need a new config that pass the default class to fetch all routes:

Currently:

$routes = app('Dingo\Api\Routing\Router')->getRoutes();

In this case I'm using package dingo/api so it should look like this:

$routes = [];
foreach(app('Dingo\Api\Routing\Router')->getRoutes() as $r) {
    foreach($r->getRoutes() as $rr) {
        $routes[] = $rr;
    }
}

Anw, I believe this package would be a must-have package in future. Thanks so much for your efforts!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions