PHPackages                             maks757/yii2-seo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. maks757/yii2-seo

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

maks757/yii2-seo
================

SEO extension for the Yii framework

v1.1.0(8y ago)0452PHP

Since Apr 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/maks757/yii2-seo)[ Packagist](https://packagist.org/packages/maks757/yii2-seo)[ RSS](/packages/maks757-yii2-seo/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (2)

yii-seo
=======

[](#yii-seo)

Yii framework seo optimization module

yii migrate --migrationPath=@vendor/maks757/yii2-seo/migrations

### ActiveRecord config behaviors

[](#activerecord-config-behaviors)

```
public function behaviors()
{
    return [
        'seo_data' => [
            'class' => 'maks757\seo\behaviors\SeoDataBehavior',
            'generation_field' => 'title'
        ],
        //...
    ];
}
```

add rules

```
public function rules()
{
    return [
        //...
        [['seoUrl', 'seoTitle',], 'string', 'max' => 255],
        [['seoKeywords',], 'string', 'max' => 512],
        [['seoDescription',], 'string', 'max' => 1024],
    ];
}
```

you can add properties

```
/**
 * @property string $seoUrl
 * @property string $seoTitle
 * @property string $seoKeywords
 * @property string $seoDescriptin
 */
```

and add input to form

```
