choose Username or ID as primary key?
If you don't like using primary keys that are auto generated, there is another way.

Instead of indexing the userID (which is large and slow to index, because it is a string) you can instead index the hash value of userID. You can then do:

CREATE TABLE Users (
  ID BIGINT
  , Username VARCHAR(255)
)


And you can find the user with:

$user = User::find(hash(user1));


You just need to pick a good hash function. A great candidate is MurmurHash (google it).