K
K
Klein Maximus2016-02-13 19:46:27
Yii
Klein Maximus, 2016-02-13 19:46:27

Is it possible to get all possible routes of an application in Yii2?

For example, routes are described as follows:

[
    'GET /'     => 'default/index',
    'POST /'    => 'default/login',
    'OPTIONS /' => 'default/options',
    [
        'class'      => 'yii\rest\UrlRule', 
        'controller' => ['place', 'service', 'employee'],
    ]
]

Is it possible to get all possible route options in Yii2?
If this is not possible with the built-in Yii2 tools, then please advise a third-party module.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2016-02-15
@modestguy

php yii routes - display all routes variants (not only first match).
php yii routes posts - display all routes for given controller.
php yii routes posts/view - display all routes for given controller action.
And a useful link:
https://github.com/yiisoft/yii2/issues/1763

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question