Universally Unique Identifier or UUID as it is popularly known is a 128-bit number that is generally used to identify unique information. Being 36-character long, a UUID is considered a safe bet in generating uniquely identifiable strings every time.
Generating UUID in Laravel
Laravel can generate UUIDs out of the box and ready to be used.
The following code will generate a UUID in Laravel.
$generatedUUID = Str::uuid();
That’s it. This will return an UUID.

A working example of the code can be found here.