This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Simple slugs for collections in Cockpit - https://github.com/Cockpit-HQ/Cockpit | |
Place this code or copy this file in `/config/bootstrap.php`. | |
Notes: | |
For this to work properly the collection of your choice needs a field of type 'text' (give it any name you like) and in its options a key 'slugField' with the name of the field to generate the slug from. |