How to Create Unique Slug in Laravel

Very often there is a need to refer to a model by slug. For example, you may want to hide a real model ID in the URL and replace it with a slug for better readability. Slugs must contain only digits or letters and hyphens. And they must be unique. In this article we will … Read more