Thursday, November 20, 2025
HomeLanguagesHow to Get Browser Name, Device and OS Version in Laravel?

How to Get Browser Name, Device and OS Version in Laravel?

Get browser name, device, os version in laravel; In this tutorial, you will learn how to get browser name, device, os version in laravel.

Using the jenssegers/agent composer package to get browser name, device, os version in laravel. So, execute the following command on terminal to install jenssergers/agent package into your laravel apps.

How to Get Browser Name, Device, OS Version in Laravel?

  • Laravel Get Browser Name and Version
  • Laravel Get Device Name
  • Laravel Get OS Name

Laravel Get Browser Name and Version

Use the following code to find browser version by passing the result of Agent::browser() to the version() method:

$browser = Agent::browser();
$version = Agent::version($browser);

Laravel Get Device Name

You can use the device() method that can find the user device name that the request was made from. is as follows:

$device = Agent::device();

Laravel Get OS Name

You can use the platform() method that can find the operating system that the request was made from. is as follows:

$platform = Agent::platform();

Conclusion

In this tutorial, you have learned how to get browser name, device, os version in laravel.

Recommended Laravel Tutorials

RELATED ARTICLES

Most Popular

Dominic
32404 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6775 POSTS0 COMMENTS
Nicole Veronica
11924 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11994 POSTS0 COMMENTS
Shaida Kate Naidoo
6903 POSTS0 COMMENTS
Ted Musemwa
7159 POSTS0 COMMENTS
Thapelo Manthata
6859 POSTS0 COMMENTS
Umr Jansen
6846 POSTS0 COMMENTS