PHPackages                             reefki/laravel-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. reefki/laravel-device-detector

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

reefki/laravel-device-detector
==============================

Laravel wrapper for Matomo's Universal Device Detection library.

v2.0.0(6mo ago)3175.7k↓31.2%5[1 PRs](https://github.com/reefki/laravel-device-detector/pulls)MITPHPPHP ^8.1CI passing

Since Oct 8Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/reefki/laravel-device-detector)[ Packagist](https://packagist.org/packages/reefki/laravel-device-detector)[ RSS](/packages/reefki-laravel-device-detector/feed)WikiDiscussions main Synced 4d ago

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

Laravel Device Detector
=======================

[](#laravel-device-detector)

[![tests](https://github.com/reefki/laravel-device-detector/actions/workflows/tests.yml/badge.svg)](https://github.com/reefki/laravel-device-detector/actions/workflows/tests.yml)

The Laravel wrapper for [Matomo Universal Device Detection](https://github.com/matomo-org/device-detector) library seamlessly integrates device detection capabilities into Laravel applications.

Installation
------------

[](#installation)

This package can be installed through Composer.

```
composer require reefki/laravel-device-detector
```

Optionally, you can publish the config file of this package with this command:

```
php artisan vendor:publish --provider="Reefki\DeviceDetector\DeviceDetectorServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Detect device from a user agent string:

```
use Reefki\DeviceDetector\Device;

$device = Device::detect($request->userAgent());
```

Detect device from a user agent string and optional hints:

```
use Reefki\DeviceDetector\Device;

$device = Device::detect($request->userAgent(), $request->server());
```

Detect device from a request instance:

```
use Reefki\DeviceDetector\Device;

$device = Device::detectRequest($request);
```

Detect device directly from a request instance:

```
$device = $request->device();
```

All of the above methods wil return a `DeviceDetector\DeviceDetector` instance which you can use to get the information about the device:

```
if ($device->isBot()) {
    $botInfo = $device->getBot();
} else {
    $clientInfo = $device->getClient();
    $osInfo = $device->getOs();
    $deviceName = $device->getDeviceName();
    $brand = $device->getBrandName();
    $model = $device->getModel();
}
```

Read the [Matomo's Universal Device Detection](https://github.com/matomo-org/device-detector/blob/master/README.md) library readme for more information on how to use the returned instance.

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Credits
-------

[](#credits)

- [Matomo Universal Device Detection](https://github.com/matomo-org/device-detector)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance66

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~264 days

Total

4

Last Release

208d ago

Major Versions

v1.0.2 → v2.0.02025-12-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10998084?v=4)[Rifki Aria Gumelar](/maintainers/reefki)[@reefki](https://github.com/reefki)

---

Top Contributors

[![reefki](https://avatars.githubusercontent.com/u/10998084?v=4)](https://github.com/reefki "reefki (10 commits)")[![felipehertzer](https://avatars.githubusercontent.com/u/4554784?v=4)](https://github.com/felipehertzer "felipehertzer (1 commits)")[![raz-iacob](https://avatars.githubusercontent.com/u/504620?v=4)](https://github.com/raz-iacob "raz-iacob (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[toin0u/geocoder-laravel

Geocoder Service Provider for Laravel

7615.4M17](/packages/toin0u-geocoder-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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