PHPackages                             goktugceyhan/device-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. goktugceyhan/device-detector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

goktugceyhan/device-detector
============================

Simple browser and OS detection

v1.1.5(1y ago)449MITPHPPHP &gt;=7.4

Since Jun 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/goktugcy/device-detector)[ Packagist](https://packagist.org/packages/goktugceyhan/device-detector)[ RSS](/packages/goktugceyhan-device-detector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (8)Used By (0)

Device Detector
===============

[](#device-detector)

Device Detector is a utility class for identifying user browser, operating system, device type, and preferred language based on HTTP headers.

Features
--------

[](#features)

- Detects user's browser from the User-Agent header.
- Identifies user's operating system from the User-Agent header.
- Determines user's device type from the User-Agent header.
- Retrieves user's preferred language from the Accept-Language header.

Installation &amp; Usage
------------------------

[](#installation--usage)

You can install the package via Composer:

```
composer require goktugceyhan/device-detector
```

2. **Include the Class in Your Laravel Project:**

    `use Goktugceyhan\DeviceDetector\Detector;`

### Get User Browser

[](#get-user-browser)

```
browser = Detector::getUserBrowser();
echo $browser; // Outputs the user's browser
```

### Get User Operating System

[](#get-user-operating-system)

```
$os = Detector::getUserOS();
echo $os; // Outputs the user's operating system
```

### Get User Device

[](#get-user-device)

```
$device = Detector::getUserDevice();
echo $device; // Outputs the user's device type
```

### Get User Preferred Language

[](#get-user-preferred-language)

```
$language = Detector::getUserLanguage();
echo $language; // Outputs the user's preferred language
```

### Get All User Information

[](#get-all-user-information)

```
$userInfo = Detector::getUserInfo();
print_r($userInfo); // Outputs an associative array of user information
```

Methods
-------

[](#methods)

### `getUserBrowser()`

[](#getuserbrowser)

Retrieves the user's browser based on the `User-Agent` header.

### `getUserOS()`

[](#getuseros)

Retrieves the user's operating system based on the `User-Agent` header.

### `getUserDevice()`

[](#getuserdevice)

Retrieves the user's device type based on the `User-Agent` header.

### `getUserLanguage()`

[](#getuserlanguage)

Retrieves the user's preferred language based on the `Accept-Language` header.

### `getUserInfo()`

[](#getuserinfo)

Retrieves all user information (browser, OS, device, language) as a concatenated string. Filters out any information that is not available.

Contributing
------------

[](#contributing)

1. Fork the repository.
2. Create a new branch: `git checkout -b feature/your-feature-name`.
3. Make your changes and commit them: `git commit -m 'Add some feature'`.
4. Push to the branch: `git push origin feature/your-feature-name`.
5. Open a pull request.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

680d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd070d082bae8f1c4c2e4a83b728ebe00884f59bd2746db8a86256fbca619042?d=identicon)[goktugcy](/maintainers/goktugcy)

---

Top Contributors

[![goktugcy](https://avatars.githubusercontent.com/u/17319750?v=4)](https://github.com/goktugcy "goktugcy (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/goktugceyhan-device-detector/health.svg)

```
[![Health](https://phpackages.com/badges/goktugceyhan-device-detector/health.svg)](https://phpackages.com/packages/goktugceyhan-device-detector)
```

###  Alternatives

[liquidweb/htaccess-validator-shell

Shell script for linting and validating Apache2 Htaccess files

1750.1k1](/packages/liquidweb-htaccess-validator-shell)[fisharebest/laravel-assets

Asset management for Laravel

208.1k](/packages/fisharebest-laravel-assets)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
