PHPackages                             dvizh/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. dvizh/yii2-seo

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

dvizh/yii2-seo
==============

Модуль позволяет привязывать SEO поля к моделям

22.5kPHP

Since Feb 5Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2-seo
========

[](#yii2-seo)

Модуль дает возможность быстро присвоить и быстро распаковать СЕО поля: титл, дескрипшн, кейвордс (ТДК) и т.д.

Установка
---------

[](#установка)

Выполнить команду

```
php composer require dvizh/yii2-seo "@dev"

```

Или добавить в composer.json

```
"dvizh/yii2-seo": "@dev",

```

И выполнить

```
php composer update

```

Миграция:

```
php yii migrate --migrationPath=vendor/dvizh/yii2-seo/src/migrations

```

Использование
-------------

[](#использование)

К модели подключить поведение:

```
    function behaviors()
    {
        return [
            'seo' => [
                'class' => 'dvizh\seo\behaviors\SeoFields',
            ],
        ];
    }
```

Теперь все СЕО поля доступны при вызове $model-&gt;seo.

Пример использования во вью файле:

```
if(!$title = $model->seo->title) {
    $title = "Купить {$model->name} в Кургане в магазине «Шоп45»";
}

if(!$description = $model->seo->description) {
    $description = 'Страница '.$model->name;
}

if(!$keywords = $model->seo->keywords) {
    $keywords = '';
}

$this->title = $title;

$this->registerMetaTag([
    'name' => 'description',
    'content' => $description,
]);

$this->registerMetaTag([
    'name' => 'keywords',
    'content' => $keywords,
]);
```

Виджеты
-------

[](#виджеты)

Ввод СЕО полей:

```

```

Его необходимо вызвать внутри формы редактирования вашей модели.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8104605?v=4)[pistol88](/maintainers/pistol88)[@pistol88](https://github.com/pistol88)

---

Top Contributors

[![pistol88](https://avatars.githubusercontent.com/u/8104605?v=4)](https://github.com/pistol88 "pistol88 (11 commits)")

### Embed Badge

![Health badge](/badges/dvizh-yii2-seo/health.svg)

```
[![Health](https://phpackages.com/badges/dvizh-yii2-seo/health.svg)](https://phpackages.com/packages/dvizh-yii2-seo)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
