PHPackages                             thytanium/agent - 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. thytanium/agent

Abandoned → [jenssegers/agent](/?search=jenssegers%2Fagent)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

thytanium/agent
===============

User-Agent class ported from CodeIgniter to Laravel

v2.0.1(11y ago)2102MITPHPPHP &gt;=5.4.0

Since Feb 12Pushed 11y ago1 watchersCompare

[ Source](https://github.com/thytanium/agent)[ Packagist](https://packagist.org/packages/thytanium/agent)[ RSS](/packages/thytanium-agent/feed)WikiDiscussions master Synced 1mo ago

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

User Agent
----------

[](#user-agent)

### For Laravel

[](#for-laravel)

User-Agent class ported from CodeIgniter to Laravel. It provides specific information about the user agents making requests to your app.

This project is based on [CodeIgniter](http://codeigniter.com)'s [User\_Agent](http://github.com/bcit-ci/CodeIgniter) class.

- [Install](#install)
    - [Laravel 4](#laravel-4)
    - [Laravel 5](#laravel-5)
- [Use](#use)
    - [Browser](#browser)
    - [Platform](#platform)
    - [Mobile](#mobile)
    - [Robot](#robot)
    - [Accepted languages](#accepted-languages)
    - [Accepted charsets](#accepted-charsets)
    - [Is it a browser?](#is-it-a-browser)
    - [Is it a robot?](#is-it-a-robot)
    - [Is it a mobile?](#is-it-a-mobile)
    - [Is it a desktop?](#is-it-a-desktop)
    - [Accepts language?](#accepts-language)
    - [Accepts charset?](#accepts-charset)
- [Contributing](#contributing)
- [Links](#links)

### Install

[](#install)

1. Edit the `require` section in your `composer.json` file

    #### Laravel 4

    [](#laravel-4)

    ```
    "require": {
    	"thytanium/agent": "1.*"
    }
    ```

    #### Laravel 5

    [](#laravel-5)

    ```
    "require": {
    	"thytanium/agent": "2.*"
    }
    ```
2. Run `composer update`
3. Edit `app/config/app.php`

    ```
    'providers' => array(
    	...
    	'Thytanium\Agent\AgentServiceProvider',
    );

    ...

    'aliases' array(
    	...
    	'Agent' => 'Thytanium\Agent\Facades\Agent',
    );
    ```

### Use

[](#use)

#### Browser

[](#browser)

```
$browser = Agent::browser() //Firefox, Chrome, etc.
```

#### Browser version

[](#browser-version)

```
$version = Agent::version() //35.0, 34.0, etc.
```

#### Platform

[](#platform)

```
$platform = Agent::platform() //Windows 8, Windows XP, Linux, MacOS X
```

#### Mobile

[](#mobile)

```
$mobile = Agent::mobile() //iPhone, iPad, PlayStation 3, Android
```

#### Robot

[](#robot)

```
$robot = Agent::robot() //Googlebot, Bing, Yahoo
```

#### Accepted languages

[](#accepted-languages)

```
$languages = Agent::languages() //en-us, es-ar, en-gb
```

#### Accepted charsets

[](#accepted-charsets)

```
$charsets = Agent::charsets() //utf-8, iso-8859-1
```

#### Is it a browser?

[](#is-it-a-browser)

```
$browser = Agent::isBrowser() //true or false
```

#### Is it a robot?

[](#is-it-a-robot)

```
$robot = Agent::isRobot() //true or false
```

#### Is it a mobile?

[](#is-it-a-mobile)

```
$mobile = Agent::isMobile() //true or false
```

#### Is it a desktop?

[](#is-it-a-desktop)

```
$desktop = Agent::isDesktop() //true or false
```

#### Accepts language?

[](#accepts-language)

```
$language = Agent::acceptLanguage('en') //true or false
```

#### Accepts charset?

[](#accepts-charset)

```
$charset = Agent::acceptCharset('utf-8') //true or false
```

### Contributing

[](#contributing)

Feel free to contribute to this little project.

### Links

[](#links)

- [CodeIgniter](http://codeigniter.com)
- [Laravel](http://laravel.com)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

4

Last Release

4087d ago

Major Versions

v1.0 → v2.02015-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ac4e3c75a8b6ccf804c6318180c4d8246f215852da188e2a050f1684fbe2d32?d=identicon)[thytanium](/maintainers/thytanium)

---

Top Contributors

[![aleaugustog](https://avatars.githubusercontent.com/u/1444898?v=4)](https://github.com/aleaugustog "aleaugustog (32 commits)")

### Embed Badge

![Health badge](/badges/thytanium-agent/health.svg)

```
[![Health](https://phpackages.com/badges/thytanium-agent/health.svg)](https://phpackages.com/packages/thytanium-agent)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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