Back to the Learning

Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.
Sign up to get full access or log in to your account and sit back.

A Thread Should Have a Unique Slug: Part 2

Episode 76 Run Time 11:44

At this point, we are generating slugs for each new thread; however, what happens if multiple threads have the same title? Everything will blow up, that's what! It sounds like we need to detect existing slugs in the database, and apply an increment to the slug.

View the source code for this episode on GitHub.

Tags slug

Publish Date: September 6, 2017