@stack('css') @php // Check if the user agent string is set in the server superglobal if (isset($_SERVER['HTTP_USER_AGENT'])) { // Get the user agent string $userAgent = $_SERVER['HTTP_USER_AGENT']; // Check if the user agent string contains any keywords indicating a mobile device $isMobile = (bool)preg_match("/(android|iphone|ipod|opera mini|blackberry|windows phone)/i", $userAgent); } else { // Handle the case where the user agent is not set $userAgent = 'unknown'; $isMobile = false; } @endphp @stack('scripts')