Download the PHP package cetver/yii2-routes-collector without Composer
On this page you can find all versions of the php package cetver/yii2-routes-collector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-routes-collector
Routes collector
Provides tools for collecting, saving and manipulating routes of web applications.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuring
Run the migration command
Update the console application configuration file
Usage
Create web-applications configuration file in the following format:
Run the collect command
If you need to display routes to the user, run the "routes/extract-message" command
The "routes/extract-message" command arguments:
- The first argument is the "message/extract" command options in JSON format
- The second argument is the first argument of the translator function
Now you can set aliases/translations by editing the files:
@app/messages/en-US/routes.php
@app/messages/ru-RU/routes.php
Tests
Run the following command
Create virtual hosts (nginx example):
- basic.cetver-yii2-routes-collector points to "tests/_data/apps/basic/web"
- frontend.cetver-yii2-routes-collector points to "tests/_data/apps/advanced/backend/web"
- backend.cetver-yii2-routes-collector points to "tests/_data/apps/advanced/frontend/web"
Change DB configuration here or run the following command
Run the following commands
Examples
After running the tests, open the links
- http://basic.cetver-yii2-routes-collector/examples/default/tree
- http://backend.cetver-yii2-routes-collector/examples/default/tree
If you follow the instructions correctly, you should see the pages as in the screenshots below
- Basic app
- Tree
- Ordered tree
- Aliases(i18n)
- Real life example
- Advanced apps
- Tree
- Ordered tree
- Aliases(i18n)
- Real life example