Thursday, November 13, 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
32399 POSTS0 COMMENTS
Milvus
95 POSTS0 COMMENTS
Nango Kala
6765 POSTS0 COMMENTS
Nicole Veronica
11916 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11983 POSTS0 COMMENTS
Shaida Kate Naidoo
6889 POSTS0 COMMENTS
Ted Musemwa
7141 POSTS0 COMMENTS
Thapelo Manthata
6834 POSTS0 COMMENTS
Umr Jansen
6838 POSTS0 COMMENTS