lilhermit / cakephp-plugin-toolkit
Toolkit plugin for CakePHP-3
Installs: 18 902
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 3
Type:cakephp-plugin
Requires
- cakephp/cakephp: ^3.3|^4.0
- jdorn/sql-formatter: ^1.2.0
Requires (Dev)
- cakephp/cakephp-codesniffer: ^3.0|~4.0.0
- phpunit/phpunit: ^5.3|^8.5
This package is auto-updated.
Last update: 2024-10-20 20:59:47 UTC
README
This plugin contains lots of useful content in one plugin
Installation
- Add the plugin with the following command, replacing
1.*
withdev-master
if you want the bleeding edge:
composer require lilhermit/cakephp-plugin-toolkit:1.*
- Load the plugin in your
bootstrap.php
Plugin::load('LilHermit/Toolkit', ['bootstrap' => true]);
SluggableBehavior
Add the Behavior to any Table using $this->addBehavior('LilHermit/Toolkit.Sluggable');
in the initialize
method
The Behavior takes the following config options
Pass the options as an array like
$this->addBehavior('LilHermit/Toolkit.Sluggable', [
'field' => 'name',
'lowerCase' => true,
'onUpdate' => false
]);