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.
Published on Sep 6th, 2017.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.