Hello. Usually, I did not ask myself this question, but used the id of the object that was created by auto increment. That is, I searched for objects based on them, which is auto-increment $post = Post::find(1); . And I often noticed that in large applications they generate unique random identifiers for objects.
For example: if they create the first category, then its id (auto-increment) will be 1, and some kind of gid , pid , cid will be equal to 10254 . That's what it's called? And how to make a random but unique id generated for an object?
max() + 1to help you - teran