We can use the following package to generate UUID from laravel.
ramsey/uuid
You can download it from UUID .
Installation
Run the following command from the command prompt
> composer require ramsey/uuid
Usage
<?php
use Ramsey\Uuid\Uuid;
class Uuid{
public function generateUuid(){
$uuid4 = Uuid::uuid4();
return $uuid4->toString();
}
}
?>
ramsey/uuid
You can download it from UUID .
Installation
Run the following command from the command prompt
> composer require ramsey/uuid
Usage
<?php
use Ramsey\Uuid\Uuid;
class Uuid{
public function generateUuid(){
$uuid4 = Uuid::uuid4();
return $uuid4->toString();
}
}
?>
No comments:
Post a Comment