If you want to replace DB auto-increment IDs with something more sophisticated, one of the solutions is UUID. In this article, I will show you how UUID columns work in Laravel, and what are the options and tools to use them.
What is UUID and Why You Would Need It?
If we take a look at Wikipedia, this is the definition:
"A universally unique identifier (UUID) is a 128-bit label used for information in computer systems. The term globally unique identifier (GUID) is also used."
This term comes not from Laravel or PHP, it's a general concept for IT projects, to uniquely identify records.
Some UUID examples:
You would save these identifiers in the database, instead of (or in addition to) a typical ID column.
So, if you have these URLs in your project:
With UUID, they would look like this:
Why would you do that? A few reasons...