2017 © Pedro Peláez
 

cakephp-plugin cake3-sluggable

A simple Cake3 plugin to slug fields and find records by slug.

image

xety/cake3-sluggable

A simple Cake3 plugin to slug fields and find records by slug.

  • Thursday, January 21, 2016
  • by Xety
  • Repository
  • 3 Watchers
  • 6 Stars
  • 8,975 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Cake3 Sluggable

A simple Cake3 plugin to slug fields and find records by slug., (*1)

Build Status Coverage Status Scrutinizer Latest Stable Version Total Downloads License, (*2)

Requirements

  • CakePHP 3.X

Installation

Run : composer require xety/cake3-sluggable:1.* Or add it in your composer.json: ``` php "require": { "xety/cake3-sluggable": "1.*" },, (*3)


## Usage In your `config/bootstrap.php` add : ``` php Plugin::load('Xety/Cake3Sluggable');

In your model initialize(): ``` php $this->addBehavior('Xety/Cake3Sluggable.Sluggable');, (*4)


To use the custom finder : ``` php $this->Users ->find('slug', [ 'slug' => 'your-slug-here', 'slugField' => 'Users.slug' ]);

Configuration

  • field

    Default : title, (*5)

    The field to slug : php $this->addBehavior('Xety/Cake3Sluggable.Sluggable', [ 'field' => 'username' ] );, (*6)

  • slug

    Default : slug, (*7)

    The slug field name in your database : php $this->addBehavior('Xety/Cake3Sluggable.Sluggable', [ 'field' => 'username', 'slug' => 'slug_username' ] );, (*8)

  • replacement

    Default : -, (*9)

    The replacement characters used to replace space etc : php $this->addBehavior('Xety/Cake3Sluggable.Sluggable', [ 'replacement' => '_' ] );, (*10)

Contribute

Follow this guide to contribute, (*11)

The Versions

21/01 2016

dev-master

9999999-dev https://github.com/Xety/Cake3-Sluggable

A simple Cake3 plugin to slug fields and find records by slug.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm plugin cakephp sluggable fields cake3 slug records

21/01 2016

v1.2

1.2.0.0 https://github.com/Xety/Cake3-Sluggable

A simple Cake3 plugin to slug fields and find records by slug.

  Sources   Download

MIT

The Requires

 

The Development Requires

orm plugin cakephp sluggable fields cake3 slug records

27/12 2015

v1.1

1.1.0.0 https://github.com/Xety/Cake3-Sluggable

A simple Cake3 plugin to slug fields and find records by slug.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp sluggable fields cake3 slug records

04/11 2014

v1.0

1.0.0.0 https://github.com/Xety/Cake3-Sluggable

A simple Cake3 plugin to slug fields and find records by slug.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp sluggable fields cake3 slug records