PHPackages                             vinelab/assistant - 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. vinelab/assistant

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

vinelab/assistant
=================

An assistant package consisted of helper classes

v1.2.0(10y ago)410.0k2[1 PRs](https://github.com/Vinelab/assistant/pulls)2MITPHPPHP &gt;=5.3.0

Since Jun 20Pushed 10y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (2)Versions (12)Used By (2)

[![Build Status](https://camo.githubusercontent.com/19293c9b98f8bdeb1ec9bf3e7cb2fe41e86589c725a8cebf6a7f60d98e092639/68747470733a2f2f7472617669732d63692e6f72672f56696e656c61622f617373697374616e742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Vinelab/assistant)

Assistant
=========

[](#assistant)

A bunch of helper classes that provides:

- Device detection (mobile, browser, bot, social network crawlers, etc.)
- String formatting
- Generating UUIDs (v4 compliant) and random IDs

> Supports UTF-8 Character sets.

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

[](#installation)

### Dependencies

[](#dependencies)

- php 5.3+
- mbstring (extension)

### via Composer

[](#via-composer)

```
composer require vinelab/assistant

```

Or add it to your `composer.json`

```
{
     "require": {
         "vinelab/assistant": "*"
     }
 }
```

#### Laravel

[](#laravel)

Edit **app.php** and add `'Vinelab\Assistant\AssistantServiceProvider'` to the `'providers'` array.

It will automatically alias the classes **Formatter**, **DeviceDetector** and **Generator**, In case you would like to customize their names, edit the `aliases` array in **app.php** with the following:

```
array(
	'...',
	'MyFormatter' => 'Vinelab\Assistant\Facades\Formatter',
	'MyGenerator' => 'Vinelab\Assistant\Facades\Generator',
	'MyDeviceDetector' => 'Vinelab\Assistant\Facades\DeviceDetector',
)
```

### Formatter

[](#formatter)

```
	Formatter::snakify('my word to make a snake'); // output: my_word_to_make_a_snake

	Formatter::camelify('hakuna matata'); //output: hakunaMatata

	Formatter::neutralize('I hAtE whEn sOmEoNe wRites thInGs LIKE tHiS');
	// output: ihatewhensomeonewritesthingslikethis

	Formatter::dashit('bash cash slash'); // output: bash-cash-slash

	Formatter::date('10-02-2010 12:13:00'); // output: 10/02/10

	Formatter::date('10-02-2010 12:13:00', 'd-m-y'); // output: 10-02-10

	// Turn a camelCase string into dash-separated string
	Formatter::aliasify('simpleTest'); // output: simple-test

	Formatter::br2nl('ab'); // output: a\nb

	// Clean up HTML formatting to be saved in the database or used as plain text
	// keeping links only as anchor tags. Solves an issue with editors when pasting
	// in text from word processors or web pages. PS: removes all sorts of media.
	Formatter::cleanHTML('someHTMLcleaned');
	// output: some\n\nHTML\ncleaned\n
```

### DeviceDetector

[](#devicedetector)

```
	$user_agent = $_SERVER['HTTP_USER_AGENT'];

	// or in case of laravel
	$user_agent = Request::server('HTTP_USER_AGENT');

	DeviceDetector::isMobile($user_agent); // true|false

	DeviceDetector::isBrowser($user_agent); // true|false

	DeviceDetector::isBot($user_agent); // true|false - also detects sharing bots

	DeviceDetector::isSharingBot($user_agent) // true|false

	DeviceDetector::whatIs($user_agent); // mobile|browser|bot|sharing-bot

	DeviceDetector::os($user_agent); // ios|android|blackberry|windows|other
```

### Generator

[](#generator)

```
	// Generate a UUID v4 compliant.
	$uuid = Generator::uuid();

	// unique identifier that does not exceed 30 chars
	$id = Generator::randomId(); // 907927051cdd15588d36
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

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

Recently: every ~121 days

Total

11

Last Release

3854d ago

Major Versions

0.1.5 → 1.0.02014-07-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4564469?v=4)[Sociata](/maintainers/Vinelab)[@Vinelab](https://github.com/Vinelab)

---

Top Contributors

[![Mulkave](https://avatars.githubusercontent.com/u/2647333?v=4)](https://github.com/Mulkave "Mulkave (35 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vinelab-assistant/health.svg)

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

###  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)
