I\'m building a laravel application where I want to keep track of client browser details such as browser name. How do I do it using Laravel ?
public function
With latest version of BrowserDetect package, you can get browser information as below:
Install using below command:
composer require hisorange/browser-detect
Once installed, add dependency in config/app.php file.
Add below line in providers array.
hisorange\BrowserDetect\ServiceProvider::class,
Add below line in alias array.
'BrowserDetect' => hisorange\BrowserDetect\Facade::class,
Include package in any class file as below to use:
use BrowserDetect;
After this you can access BrowserDetect methods as explained in below package link:
BrowserDetect package link