Skip to content
Code-Schnipsel Gruppen Projekte
Uuid.php 447 B
Newer Older
Patrick Müller's avatar
Patrick Müller committed
<?php

namespace QUI\ERP\Coupons\CodeGenerators;

use QUI\ERP\Coupons\CodeGeneratorInterface;
Patrick Müller's avatar
Patrick Müller committed
use Ramsey\Uuid\Uuid as UuidCreator;

class Uuid implements CodeGeneratorInterface
{
    /**
     * Generate a random, unique Invite code
     *
     * @param string $prefix (optional)
     * @return string
     */
    public static function generate(string $prefix = ''): string
Patrick Müller's avatar
Patrick Müller committed
    {
        return $prefix . UuidCreator::uuid1()->toString();
Patrick Müller's avatar
Patrick Müller committed
    }
}