Slug generator for Statamic

Addon by Ray.nl

Slug generator for Statamic Main Screenshot

If you have a product collection and have a product with the slug php already then you can call the generateslug.


If you have a entry in a collection with the possibilty to have a duplicate slug, then you can call the generateslug. If the slug 'car' allready exists in the products collection it wil return 'car-1'

Slug::generateSlug('products', 'car')

If you want to customize the seperator add a third parameter that the seperator is.

Slug::generateSlug('products', 'car', '.')

It returns now "car.1"

As fourth parameter you can add the starting number.