What is a slug?
Asked 07 September, 2021
Viewed 2.3K times
  • 53
Votes

I'm currently working through CodeIgniters tutorial in its fantastic documentation. However there is a term that is frequently used and it's called a "slug". I've looked around a lot to find out what the term means and I can't make sense of what it is and what it's for. Here's an example of when it's used:


  

With this code you can perform two different queries. You can get all news records, or get a news item by its slug

5 Answer