register step

This commit is contained in:
Kevin Adametz 2020-03-26 09:46:06 +01:00
parent 1ada368ed4
commit f06d2d15a5
50 changed files with 748 additions and 276 deletions

View file

@ -0,0 +1,21 @@
<?php
namespace App\Services;
use App\User;
class UserService
{
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;
}
}

View file

@ -1,8 +1,6 @@
<?php
namespace App\Services;
use App\Models\UserHistory;
class Util