libarea/app/Services/DetectMobile.php
Evg 0d4075ada9 ADD: class DetectMobile
+ коррекция Ночного режима.
2023-11-21 03:56:49 +03:00

21 lines
385 B
PHP

<?php
declare(strict_types=1);
namespace App\Services;
class DetectMobile
{
public static function index()
{
$info = parse_user_agent();
$allowed = ['Android', 'iPhone', 'iPad', 'Windows Phone OS', 'Kindle', 'Kindle Fire', 'BlackBerry', 'Playbook'];
if (in_array($info['platform'], $allowed)) {
return true;
}
return false;
}
}