PHPackages                             alexeymezenin/laravel-russian-slugs - 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. alexeymezenin/laravel-russian-slugs

ActiveLibrary

alexeymezenin/laravel-russian-slugs
===================================

Russian SEO friendly slugs for Laravel 5

0.9(10y ago)262.6k8[1 issues](https://github.com/alexeymezenin/laravel-russian-slugs/issues)[1 PRs](https://github.com/alexeymezenin/laravel-russian-slugs/pulls)MITPHPPHP &gt;=5.4.0

Since Apr 4Pushed 4y ago3 watchersCompare

[ Source](https://github.com/alexeymezenin/laravel-russian-slugs)[ Packagist](https://packagist.org/packages/alexeymezenin/laravel-russian-slugs)[ RSS](/packages/alexeymezenin-laravel-russian-slugs/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (23)Used By (0)

**The package is not supported anymore**

### Introduction

[](#introduction)

This package offers easy to use cyrillic slugs like 'Как\_вырастить\_дерево' and Yandex transliterated 'kak-vyrastis-derevo' slugs and their variations with lowercased letters and different separators.

- [Installation](#Installation)
- [Using slugs](#Using-slugs)
- [Manual slug creation](#Manual-slug-creation)
- [Configuration](#Configuration)
- [Commands](#Commands)

### Installation

[](#installation)

Start with editing your Laravel project's composer.json file, add this line to the *require* section:

```
"require": {
    ....
    "alexeymezenin/laravel-russian-slugs": "0.9.*"

```

After that run this command to install package:

```
composer update

```

Now, insert these two lines into provider and aliases arrays in `config/app.php`:

```
'providers' => [
    ....
    AlexeyMezenin\LaravelRussianSlugs\SlugsServiceProvider::class,

'aliases' => [
    ....
    'Slug' => AlexeyMezenin\LaravelRussianSlugs\SlugsFacade::class,

```

Finally, you need to register config file and slugs-related commands by running:

```
php artisan vendor:publish

```

### Using slugs

[](#using-slugs)

To use package, you need to update your models with this`use` clause:

```
class Articles extends Model
{
    use \AlexeyMezenin\LaravelRussianSlugs\SlugsTrait;

```

Then you need to create `slug` column in a migration:

```
$table->string('slug');

```

To use **auto slug creation** feature add `slugFrom` property to your model:

```
protected $slugFrom = 'article_name';

```

In this case, every time when you're saving data to a DB, package tries to create (but not recreate) a new slug and save it:

```
$article = Article::create(['article_name' => 'Как вырастить дерево?']);

```

Of course, that doesn't work with mass inserts and updates when you're updating multiple rows with one query.

### Manual slug creation

[](#manual-slug-creation)

To **create new record** with a slug use `reslug()` method. This will add slug, based on `name` column:

```
$article = new Article;
$article->name = 'How to grow a tree?';
$article->reslug('name');
$article->save();

```

You can **update existing record** and add a slug:

```
$article = Article::find(1);
$article->reslug('name');
$article->save();

```

If slug already exists, but you need to recreate it, use forced reslug:

```
$article->reslug('name', true);

```

Alternatively, you can use `Slug` facade to manually work with slugs:

```
$article = Article::find(1);
$article->update([
    'slug' => Slug::build($article->name)
    ]);

```

`findBySlug()` method allows you to find a model by it's slug:

```
$slug = 'how-to-grow-a-tree';
$article = Article::findBySlug($slug);
echo $article->name; // Will output "How to grow a tree?"

```

### Configuration

[](#configuration)

To configure a package you should edit `config/seoslugs.php` file.

`delimiter` is a symbol which replaces all spaces in a string. By default it's '\_', but also can be '-'.

`urlType` is a type of slug:

Default is **1**. Used for URLs like `/категория/книги_в_москве`

**2** is for traslitterated URLs like `/kategoriya/knigi_v_moskve`, Yandex rules used to transliterate URL.

`keepCapitals` is `false` by default. When `true` it keeps capital letters in a slug, for example: `/книги_в_Москве`

`slugColumnName` sets the name of a slug column. `slug` by default.

### Commands

[](#commands)

There are three console commands available in the package:

`php artisan slug:auto {table} {column}` command creates and executes migration, reslugs a table (creates slugs for all rows) using {column} as source.

`php artisan slug:migration {table}` command creates migration to add a slug column.

`php artisan slug:reslug {table} {column}` command creates or recreates slugs for a specified table.

Commands `slug:auto` and `slug:reslug` will recreate all slugs, even if they are already exist (forced reslug used).

### Copyright

[](#copyright)

RussianSeoSlugs was written by Alexey Mezenin and released under the MIT License.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

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 ~1 days

Total

22

Last Release

3667d ago

PHP version history (2 changes)0.7PHP &gt;=5.4.0

0.8.3PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdf0a54c1ea4c64d63c8a5eb72cc43c719a514d1adccf667ec451b9a13763e49?d=identicon)[alexeymezenin](/maintainers/alexeymezenin)

---

Top Contributors

[![alexeymezenin](https://avatars.githubusercontent.com/u/4699969?v=4)](https://github.com/alexeymezenin "alexeymezenin (85 commits)")

---

Tags

urlgoogleseoyandextranslitslugscyrillicrussian

### Embed Badge

![Health badge](/badges/alexeymezenin-laravel-russian-slugs/health.svg)

```
[![Health](https://phpackages.com/badges/alexeymezenin-laravel-russian-slugs/health.svg)](https://phpackages.com/packages/alexeymezenin-laravel-russian-slugs)
```

###  Alternatives

[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[arcanedev/seo-helper

SEO Helper is a framework agnostic package that provides tools &amp; helpers for SEO (Laravel supported).

332467.0k4](/packages/arcanedev-seo-helper)[t1gor/robots-txt-parser

PHP class to parse robots.txt rules according to Google, Yandex, W3C and The Web Robots Pages specifications.

85494.6k4](/packages/t1gor-robots-txt-parser)[koehlersimon/slug

Helps you managing the URL slugs of your TYPO3 site

2965.7k](/packages/koehlersimon-slug)[voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

254.1M7](/packages/voku-urlify)

PHPackages © 2026

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