kravchukdim / yii2seo
Yii2 SEO extension
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 3
Open Issues: 0
Type:yii2-extension
This package is not auto-updated.
Last update: 2025-07-09 12:53:18 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist kravchukdim/yii2seo "*"
or add
"kravchukdim/yii2seo": "*"
to the require section of your composer.json.
Usage
You need execute seo init migration by the following command:
php yii migrate/up --migrationPath=@kravchukdim/yii2seo/migrations
To use this extension, you have to configure the main config in your application:
'modules' => [ 'admin' => [ 'controllerMap' => [ 'seo-module' => 'kravchukdim\yii2seo\controllers\SeoController', 'seo-category-module' => 'kravchukdim\yii2seo\controllers\SeoCategoryController' ], ], ],
You can use component seo in your layouts, views, controllers like following:
use kravchukdim\yii2seo\components\Seo;
Seo::setTitle($options);
Seo::setPageContentTag($options);
Seo::setMetaTags($options);