username unique laravel code example
Example: laravel automatically generate unique username
Str::slug($request->name) . (User::max('id') + random_int(99, 99999))
Str::slug($request->name) . (User::max('id') + random_int(99, 99999))