endorphin-studio / browser-detector-laravel
Laravel package for endorphin-studio/browser-detector
1.0.0
2021-05-31 20:29 UTC
Requires
- php: >=7.4
- ext-json: *
- endorphin-studio/browser-detector: ^6.0
- illuminate/http: ^8
- illuminate/support: ^8
README
Laravel package for browser-detector
Code Status
About
Author: Serhii Nekhaienko
Email: sergey.nekhaenko@gmail.com
Stable Version: 1.0.0
License: MIT
Requirements
PHP >=7.4
Laravel ^8
endorphin-studio/browser-detector ^6.0
Install via Composer
composer require endorphin-studio/browser-detector-laravel
Usage example
use EndorphinStudio\Laravel\BrowserDetector\BrowserDetector; /** * @var BrowserDetector $detector **/ $detector = app()->make(BrowserDetector::class); echo '<pre>'.$detector.'</pre>';
You will see result like this one:
{ "version": "1.1.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", "os": { "family": "mac", "type": "desktop", "version": "10.15.7", "name": "Mac OS X" }, "browser": { "type": "desktop", "version": "91.0.4472.77", "name": "Chrome" }, "device": { "model": null, "hasModel": false, "version": null, "name": "PC", "type": "desktop" }, "isTouch": false, "isMobile": false, "isTablet": false, "coreVersion": "5.0.0", "modules": { "endorphin-studio/browser-detector-data": "1.1.0" } }