PHPackages                             baibaratsky/yii2-slug-behavior - 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. baibaratsky/yii2-slug-behavior

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

baibaratsky/yii2-slug-behavior
==============================

Yii2 slug behavior

33001PHP

Since Apr 17Pushed 11y ago1 watchersCompare

[ Source](https://github.com/baibaratsky/yii2-slug-behavior)[ Packagist](https://packagist.org/packages/baibaratsky/yii2-slug-behavior)[ RSS](/packages/baibaratsky-yii2-slug-behavior/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 slug behavior
==================

[](#yii2-slug-behavior)

> **I’d made this behavior before Yii2 became beta. At the moment, there is no need to use this behavior, because Yii2 has its own implementation — `SluggableBehavior`.**

This Yii2 model behavior automates the slug generation process. To attach the behavior put the following code in your model:

```
    public function behaviors()
   	{
   		return [
   			'slug' => [
   				'class' => Slug::className(),

   				// These parameters are optional, default values presented here:
   				'sourceAttributeName' => 'name', // If you want to make a slug from another attribute, set it here
   				'slugAttributeName' => 'slug', // Name of the attribute containing a slug
                'replacement' => '-', // The replacement to use for spaces in the slug
                'lowercase' => true, // Whether to return the string in lowercase or not
                'unique' => true, // Check if the slug value is unique, add number if not
   			],
   		];
   	}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

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://www.gravatar.com/avatar/5f7d017b3e4596f4d1dd702da14192fd966e18ca3b21ba25b33f43803b2ce18a?d=identicon)[baibaratsky](/maintainers/baibaratsky)

---

Top Contributors

[![baibaratsky](https://avatars.githubusercontent.com/u/1774061?v=4)](https://github.com/baibaratsky "baibaratsky (10 commits)")

### Embed Badge

![Health badge](/badges/baibaratsky-yii2-slug-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/baibaratsky-yii2-slug-behavior/health.svg)](https://phpackages.com/packages/baibaratsky-yii2-slug-behavior)
```

###  Alternatives

[bitgrave/barcode-generator

simple barcode generator base classes supporting 2d- and datamatrix barcodes

1313.7k](/packages/bitgrave-barcode-generator)

PHPackages © 2026

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