viraj-khatavkar / easy-slug

A laravel package for creating slugs easily
18 stars 5 forks source link

Unique Slug is not generated if first slug is modified #2

Closed mangya closed 9 years ago

mangya commented 9 years ago

I found the issue when using Easy Slug for user registrations. The generateUniqueSlug method fails in the following scenario.

if slug for user1 is abc-xyz if slug is generated for new user then new slug will be generated as abc-xyz-2

Now if the record with fist slug abc-xyz is modified OR deleted then the generateUniqueSlug method fails to generate a unique slug i.e. abc-xyz-2 is generated as new slug