userAgent(); preg_match('/Chrome\/(\d+)/', $userAgent, $matches); $isOldChrome = Arr::has($matches, 1) && $matches[1] < 55; if ($isOldChrome || Str::contains($userAgent, ['Trident', 'MSIE'])) { throw new PrettyPageException(trans('errors.http.ie')); } return $next($request); } }