mivita/app/Services/PriceService.php
2021-08-20 18:22:21 +02:00

29 lines
No EOL
465 B
PHP

<?php
namespace App\Services;
use App\User;
class PriceService
{
public static $country;
public static function createConfirmationCode() {
$unique = false;
do{
$confirmation_code = str_random(30);
if(User::where('confirmation_code', '=', $confirmation_code)->count() == 0){
$unique = true;
}
}
while(!$unique);
return $confirmation_code;
}
}