PHPackages                             atelfoto/sluggable - 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. atelfoto/sluggable

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

atelfoto/sluggable
==================

Sluggable plugin for CakePHP

5.0.0(2y ago)317MITPHPPHP &gt;=8.1

Since Aug 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/atelfoto/sluggable)[ Packagist](https://packagist.org/packages/atelfoto/sluggable)[ Docs](https://github.com/atelfoto/sluggable)[ RSS](/packages/atelfoto-sluggable/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (12)Used By (0)

Plugin Sluggable for CakePHP 5
===============================

[](#plugin-sluggable--for-cakephp-5-)

[![Build Status](https://camo.githubusercontent.com/0d281af0cd0a2d1b119617b9234629c5b7df3db60b62824eade882cfd72cb8f5/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6174656c666f746f2f736c75676761626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/atelfoto/sluggable)[![License](https://camo.githubusercontent.com/624204708a634c98e5f8508c269da0288a4ce56a421a056835b92d649449d4e3/68747470733a2f2f706f7365722e707567782e6f72672f6174656c666f746f2f736c75676761626c652f6c6963656e73652e737667)](//packagist.org/packages/atelfoto/sluggable)[![Latest Stable Version](https://camo.githubusercontent.com/78375ba469bae25961d06eeaf6ff9afd1d2001d6d739dbf7565fd6189566e485/68747470733a2f2f706f7365722e707567782e6f72672f6174656c666f746f2f736c75676761626c652f762f737461626c652e737667)](//packagist.org/packages/atelfoto/sluggable)[![Packagist PHP Version Support (specify version)](https://camo.githubusercontent.com/361f3f7bed1950b8061376265af89bdd440bd11f90aa338c104f98ce3e309e12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f63616b657068702f63616b657068702f352e302e313f636f6c6f723d677265656e266c6f676f3d63616b65706870)](https://camo.githubusercontent.com/361f3f7bed1950b8061376265af89bdd440bd11f90aa338c104f98ce3e309e12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f63616b657068702f63616b657068702f352e302e313f636f6c6f723d677265656e266c6f676f3d63616b65706870)[![GitHub repo size](https://camo.githubusercontent.com/d12dd856f851a2e12015976d0db23bae7d12ce9e0d04d0cb1a1fb9818ccbff37/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6174656c666f746f2f736c75676761626c653f636f6c6f723d726564266c6f676f3d63616b65706870)](https://camo.githubusercontent.com/d12dd856f851a2e12015976d0db23bae7d12ce9e0d04d0cb1a1fb9818ccbff37/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f6174656c666f746f2f736c75676761626c653f636f6c6f723d726564266c6f676f3d63616b65706870)[![Code Qualité](https://camo.githubusercontent.com/7ff6266ff81e8547194f4e276dc191c795779b9599844bee961e1b4bd7b5f8d4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6174656c666f746f2f736c75676761626c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/atelfoto/sluggable/?branch=master)[![PHP Composer](https://github.com/atelfoto/sluggable/workflows/PHP%20Composer/badge.svg)](https://github.com/atelfoto/sluggable/workflows/PHP%20Composer/badge.svg)[![codecov](https://camo.githubusercontent.com/ce1c1770b8ba29b6411fac7c7c59ddc33193f9574fd8abc6350dfb254073219f/68747470733a2f2f636f6465636f762e696f2f67682f6174656c666f746f2f736c75676761626c652f67726170682f62616467652e7376673f746f6b656e3d476a7a4e677462515648)](https://codecov.io/gh/atelfoto/sluggable)

- [1. Requirements](#1-requirements)
- [2. Installation](#2-installation)
- [3. Configuration](#3-configuration)
    - [3.1. Model Table](#31-model-table)
    - [3.2. Controller](#32-controller)
    - [3.3. Route](#33-route)

1. Requirements
---------------

[](#1-requirements)

- cakephp 5.x.x

2. Installation
---------------

[](#2-installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require atelfoto/sluggable

```

- or add it in the composer.json

```
"require": {
    "atelfoto/sluggable": "1.*"
},
```

- And in a Table in `initialize();` add this line:

```
 //src/Model/Table/model.php
 $this->addBehavior('Sluggable.Sluggable');
```

3. Configuration
----------------

[](#3-configuration)

### 3.1. Model Table

[](#31-model-table)

- **Field**
    - Default: *name*
    - The field to slug ```
        $this->addBehavior('Sluggable.Sluggable', [
            'field' => 'your-field'
            ]
        );
        ```
- **Slug**
    - Default: *slug*
    - The slug field name in your database: ```
        $this->addBehavior('Sluggable.Sluggable', [
            'field' => 'your-field',
            'slug' => 'your-slug'
            ]
        );
        ```
- **Replacement**
    - Default: `-`
    - The replacement characters used to replace space:

        ```
        $this->addBehavior('Sluggable.Sluggable', [
            'replacement' => '_'
        ]);
        ```

### 3.2. Controller

[](#32-controller)

- To use in a finder:

    ```
    public function view($value = null)
      {
          $query = $this->Models->findBySlug($value)->firstOrFail();
          $this->set(compact('query'));
      }
    ```

### 3.3. Route

[](#33-route)

- In the Route

    ```
    //config/routes

    $routes->connect(
          '/the title/:slug',
          ['controller' => 'YourController', "action" => "view"],
          [
              "_name" => "the title",
              "pass" => ['slug'],
          ]
      );
    ```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

Established project with proven stability

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

Recently: every ~268 days

Total

8

Last Release

1002d ago

Major Versions

0.0.3 → 1.0.12020-10-26

1.1.0 → 4.0.02020-11-03

4.0.1 → 5.0.02023-10-04

PHP version history (2 changes)4.0.0PHP &gt;=7.2

5.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![atelfoto](https://avatars.githubusercontent.com/u/5081451?v=4)](https://github.com/atelfoto "atelfoto (46 commits)")

---

Tags

cakephppluginslugcakephpBehavior

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/atelfoto-sluggable/health.svg)

```
[![Health](https://phpackages.com/badges/atelfoto-sluggable/health.svg)](https://phpackages.com/packages/atelfoto-sluggable)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

3361.0M51](/packages/dereuromark-cakephp-tools)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

3099.1k6](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)[dereuromark/cakephp-setup

A CakePHP plugin containing lots of useful management tools

36199.6k2](/packages/dereuromark-cakephp-setup)[cakedc/tiny-mce

TinyMCE Plugin for CakePHP

10790.7k](/packages/cakedc-tiny-mce)[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

16112.0k1](/packages/dereuromark-cakephp-calendar)

PHPackages © 2026

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