PHPackages                             coreproc/laravel-devices - 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. coreproc/laravel-devices

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

coreproc/laravel-devices
========================

Store and handle devices connecting to your web application.

0.1.0(5y ago)1314.0k↓25%1MITPHPPHP ^7.1|^8.0CI failing

Since Mar 3Pushed 5y ago3 watchersCompare

[ Source](https://github.com/CoreProc/laravel-devices)[ Packagist](https://packagist.org/packages/coreproc/laravel-devices)[ Docs](https://github.com/coreproc/laravel-devices)[ RSS](/packages/coreproc-laravel-devices/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Store and handle devices connecting to your web application
===========================================================

[](#store-and-handle-devices-connecting-to-your-web-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4c1b3f67ee7bff8b3b2ddd14f3bdaa2cecdba452bf810a0abc3d3d04badeb0a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f726570726f632f6c61726176656c2d646576696365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/coreproc/laravel-devices)[![Quality Score](https://camo.githubusercontent.com/b421ff46ff99ab6c03d0c89d2205c677f86d653e1c5973bdfecf2898881e150a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f726570726f632f6c61726176656c2d646576696365732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/coreproc/laravel-devices)[![Total Downloads](https://camo.githubusercontent.com/bbb13414038bc6d6f10c7c1305446c275b56154fddc19a65ddb8aa8b9fddcabd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f726570726f632f6c61726176656c2d646576696365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/coreproc/laravel-devices)

This package sets up the database and middleware needed in storing devices. This is perfect for handling mobile devices using your web API. You'll be able to identify each device, assign them an FCM token, and relate them to users as well.

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

[](#installation)

You can install the package via composer:

```
composer require coreproc/laravel-devices
```

You must publish the migration with:

```
php artisan vendor:publish --provider="Coreproc\Devices\DevicesServiceProvider" --tag="migrations"
```

Migrate the statuses table:

```
php artisan migrate
```

Optionally you can publish the config file with:

```
php artisan vendor:publish --provider="Coreproc\Devices\DevicesServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

To begin storing device information, you can attach the `store.device` middleware to any of your routes. Here is an example:

```
// routes/api.php

Route::middleware('store.device')->get('/test', function (Request $request) {
    return [];
});
```

Now, when you use the API endpoint `/api/test`, you can attach the device information to the header. Here is a complete list of data that you can enter:

```
curl --request GET \
  --url http://devices.test/api/test \
  --header 'x-device-app-version: 1.0.1' \
  --header 'x-device-fcm-token: firebase-cloud-messaging-token' \
  --header 'x-device-manufacturer: Samsung' \
  --header 'x-device-model: Galaxy S10' \
  --header 'x-device-os: Android' \
  --header 'x-device-os-version: 8.0' \
  --header 'x-device-udid: unique-device-udid'
```

This will store all of the above information to the database. Only the `x-device-udid` header field is required.

If a user is authenticated, it will relate the user to this device automatically.

You can define the guard to be used in the first parameter of the middleware.

```
// routes/api.php

Route::middleware('store.device:web')->get('/test', function (Request $request) {
    return [];
});
```

You can define if the device should be required or not in the second parameter, delimted by a comma.

```
// routes/api.php

Route::middleware('store.device:web,0')->get('/test', function (Request $request) {
    return [];
});
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

About CoreProc
--------------

[](#about-coreproc)

CoreProc is a software development company that provides software development services to startups, digital/ad agencies, and enterprises.

Learn more about us on our [website](https://coreproc.com).

Credits
-------

[](#credits)

- [Chris Bautista](https://github.com/chrisbjr)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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 ~778 days

Total

2

Last Release

1855d ago

PHP version history (2 changes)0.0.1PHP ^7.1

0.1.0PHP ^7.1|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7066371?v=4)[CoreProc](/maintainers/coreproc)[@CoreProc](https://github.com/CoreProc)

---

Top Contributors

[![chrisbjr](https://avatars.githubusercontent.com/u/571279?v=4)](https://github.com/chrisbjr "chrisbjr (2 commits)")

---

Tags

coreproclaravel-devices

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coreproc-laravel-devices/health.svg)

```
[![Health](https://phpackages.com/badges/coreproc-laravel-devices/health.svg)](https://phpackages.com/packages/coreproc-laravel-devices)
```

###  Alternatives

[coreproc/laravel-wallet-plus

Easily add a virtual wallet to your Laravel models. Features multiple wallets and a ledger system to help keep track of all transactions in the wallets.

2914.6k](/packages/coreproc-laravel-wallet-plus)[ericclemmons/rules-bundle

Configuration-based logic for your domain models

2013.8k](/packages/ericclemmons-rules-bundle)[mouf/html.widgets.statsgrid

This PHP package contains a HTML pivot table. You provide it with a data set and the list of columns and rows and it will display a nice pivot table.

239.8k](/packages/mouf-htmlwidgetsstatsgrid)

PHPackages © 2026

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