mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-28 06:47:24 +08:00
fix: resolve deprecation warnings across the application
This commit is contained in:
@@ -94,7 +94,7 @@ class ClientController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function isBrowserAccess(Request $request): bool
|
private function isBrowserAccess(Request $request): bool
|
||||||
{
|
{
|
||||||
$userAgent = strtolower($request->input('flag', $request->header('User-Agent')));
|
$userAgent = strtolower($request->input('flag', $request->header('User-Agent', '')));
|
||||||
return str_contains($userAgent, 'mozilla')
|
return str_contains($userAgent, 'mozilla')
|
||||||
|| str_contains($userAgent, 'chrome')
|
|| str_contains($userAgent, 'chrome')
|
||||||
|| str_contains($userAgent, 'safari')
|
|| str_contains($userAgent, 'safari')
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Coupon extends Model
|
|||||||
|
|
||||||
public function getLimitPeriodAttribute($value)
|
public function getLimitPeriodAttribute($value)
|
||||||
{
|
{
|
||||||
return collect(json_decode($value, true))->map(function ($item) {
|
return collect(json_decode((string) $value, true))->map(function ($item) {
|
||||||
return PlanService::getPeriodKey($item);
|
return PlanService::getPeriodKey($item);
|
||||||
})->toArray();
|
})->toArray();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class Helper
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function trafficConvert(int $byte)
|
public static function trafficConvert(float $byte)
|
||||||
{
|
{
|
||||||
$kb = 1024;
|
$kb = 1024;
|
||||||
$mb = 1048576;
|
$mb = 1048576;
|
||||||
|
|||||||
Reference in New Issue
Block a user