PHPackages                             comradepashka/yii2-seokit - 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. comradepashka/yii2-seokit

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

comradepashka/yii2-seokit
=========================

Set of tools that helps to construct SEO-friendly site

0.0.0.5(10y ago)016Apache-2.0PHP

Since Apr 3Pushed 10y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Yii2 framework SEO extension
============================

[](#yii2-framework-seo-extension)

SEOkit is a set of tools that helps to construct SEO-friendly site.

UrlHistoryBehavior handle any changes of chosen model attribute such as URL for later use, e.g. redirection to actual URL fo model.

2do list

- have to find way how to handle complex model Primary Key when create dynamic relation

Changes
-------

[](#changes)

Fix changes with empty url

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist comradepashka/yii2-seokit "dev-master"

```

or add

```
"comradepashka/yii2-seokit": "dev-master"

```

to the require section of your `composer.json` file.

Update database schema
----------------------

[](#update-database-schema)

```
$ php yii migrate/up --migrationPath=@vendor/comradepashka/yii2-seokit/migrations

```

Configure
---------

[](#configure)

Add behavior to a model

```
    public function behaviors()
    {
        return array_merge(parent::behaviors(), [
            [
                'class' => UrlHistoryBehavior::className(),
                'url_attribute' => 'url' // default
            ]
        ]);
    }

```

Usage
-----

[](#usage)

To list all previous urls:

```
    foreach ($model->UrlHistory as $item) {
        echo %item->old_url;
    };

```

In the [Front controller](https://en.wikipedia.org/wiki/Front_controller)you can check if there was an old URL that should be redirected to actual document:

```
    if ($url = $model->checkRedirect($someOldUrl))
        $this->redirect($url, 301);

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

3689d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ec9390acf9f422b946ec04ed4710899ebf654eebb907d05814ebb34c1c7d382?d=identicon)[ComradePashka](/maintainers/ComradePashka)

---

Top Contributors

[![ComradePashka](https://avatars.githubusercontent.com/u/15798005?v=4)](https://github.com/ComradePashka "ComradePashka (9 commits)")

---

Tags

yii2extensionseourl history

### Embed Badge

![Health badge](/badges/comradepashka-yii2-seokit/health.svg)

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

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[umanskyi31/opengraph

Created a new component for Yii2. The Open Graph component for your website

119.7k](/packages/umanskyi31-opengraph)[amirax/yii2-seo-tools

SEO tools for Yii 2 framework

131.1k](/packages/amirax-yii2-seo-tools)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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