developer-av / yii2-request
Ecso Yii2-Request && Yii2-UrlManager.
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2025-01-02 01:58:17 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require developer-av/yii2-request
or add
"developer-av/yii2-request": "*"
to the require section of your composer.json.
Usage
To use this extension, simply add the following code in your application configuration:
return [ //.... 'components' => [ 'request' => [ 'class' => 'developerav\request\Request', 'cookieValidationKey' => '************, 'languages' => [ 'en' => 'en-US',//default language 'ru' => 'ru-RU', ] ], 'urlManager' => [ 'class' => 'developerav\request\UrlManager', 'withoutWww' => true, // 301 redirect from www.exemple.com -> exemple.com 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ ], ], ], ];
Generate Url:
Html::a('test', ['', 'lang_id' => 'ru'])