|
|
@@ -1,4 +1,15 @@
|
|
|
<?php
|
|
|
+
|
|
|
+use Illuminate\Support\Facades\Lang;
|
|
|
+
|
|
|
+if (!function_exists('lang')) {
|
|
|
+ function lang(string $key): string
|
|
|
+ {
|
|
|
+ return Lang::get("messages.{$key}");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
if (!function_exists('get_cache_key')) {
|
|
|
function get_cache_key(string $id): string
|
|
|
{
|
|
|
@@ -94,8 +105,8 @@ function bcdechex($dec)
|
|
|
$hex = '';
|
|
|
while (bccomp($dec, 0) > 0) {
|
|
|
$last = bcmod($dec, 16);
|
|
|
- $hex = dechex($last) . $hex;
|
|
|
- $dec = bcdiv($dec, 16, 0);
|
|
|
+ $hex = dechex($last) . $hex;
|
|
|
+ $dec = bcdiv($dec, 16, 0);
|
|
|
}
|
|
|
return $hex ?: '0';
|
|
|
}
|