DEV Community

Mohammed Samgan Khan
Mohammed Samgan Khan

Posted on

6 2

Slug Behavior for CakePHP 3.x, making slug management super easy

I created this behavior for CakePHP 3.x a long time ago. Managing slug manually is one hell of a work. This will take care of all the basic needs you have in a project with a slug.

Since behavior is automatically bound by the modal events, I am using before save event for all the management. It's super easy and can be customized as per need.

feel free to seek any assistance in case you feel need to do so.

Thanks

PS: in case wondering how to use it. Create a file with name SlugBehavior.php in /src/Model/Behavior/ of your project and add

$this->addBehavior('Slug');

to your modal in which you want you to use this behavior.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs