+ Homparty Part 1

This commit is contained in:
Kevin Adametz 2020-10-16 16:18:00 +02:00
parent 74923859d1
commit 9252094a04
43 changed files with 2385 additions and 66 deletions

View file

@ -2,6 +2,7 @@
namespace App\Services;
use App\Models\UserHistory;
use Illuminate\Support\Str;
use Yard;
class Util
@ -16,6 +17,17 @@ class Util
return hash_hmac('sha256', str_random(40), config('app.key'));
}
public static function uuidToken()
{
$uuid = (string) Str::uuid();
$e_uuid = explode("-", $uuid);
if(isset($e_uuid[0]) && $e_uuid[1]){
return $e_uuid[0]."-".$e_uuid[1];
}
return $uuid;
}
public static function formatDate(){
if(\App::getLocale() === "en"){
return 'yyyy-mm-dd';