PHPackages                             intervention/helper - 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. intervention/helper

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

intervention/helper
===================

Easier handling and formating of strings and dates

1.1.4(11y ago)94.7k4[2 issues](https://github.com/Intervention/helper/issues)MITPHPPHP &gt;=5.3.2

Since Feb 1Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (11)Used By (0)

> This package is **abandoned** and will no longer be maintained. I suggest using [Carbon](https://github.com/briannesbitt/Carbon) for much more advanced date functionality and the helper functions of [Illuminate/Support](https://github.com/illuminate/support) to format text.

Intervention Helper Class (Abandoned)
=====================================

[](#intervention-helper-class-abandoned)

Easier handling and formating of strings and dates. Made to work with Laravel 4 but runs also standalone.

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

[](#installation)

You can install the Helper classes quick and easy with Composer.

Require the package via Composer in your `composer.json`.

```
"intervention/helper": "dev-master"

```

Run Composer to update the new requirement.

```
$ composer update

```

The Helper classes are built to work with the Laravel 4 Framework. The integration is done in seconds.

Open your Laravel config file `config/app.php` and add the following lines.

In the `$providers` array add the service providers for this package.

```
'providers' => array(

    ...

    'Intervention\Helper\DateServiceProvider',
    'Intervention\Helper\StringServiceProvider'

),

```

Add the facade of this package to the `$aliases` array.

```
'aliases' => array(

    ...

    'Date' => 'Intervention\Helper\Facades\Date',
    'String' => 'Intervention\Helper\Facades\String'

),

```

Usage
-----

[](#usage)

### Date Helper

[](#date-helper)

- Date::\_\_construct - Returns new Date Helper object
- Date::format - Formats given timestamp to a readable format (available formats are 'date', 'datetime', 'digitdate', 'iso')
- Date::age - Calculates age between timestamps and returns readable format

### Code Example (Laravel)

[](#code-example-laravel)

```
// returns '24. Oktober 2003, 10:45' in german locale
return Date::format('datetime', '2003-10-24 10:45:13');

// returns 'October 24, 2003, 10:45 AM' in english locale
return Date::format('datetime', '2003-10-24 10:45:13');

// returns '10 Jahre' in german locale
return Date::age('2003-10-24 10:00', '2013-10-24 10:45:13');

// methods also takes unix timestamps of DateTime objects, second parameter is optional
return Date::age(1292177455);
```

### String Helper

[](#string-helper)

- String::\_\_construct - Returns new String Helper object
- String::pluralize - Returns singular or plural based on the given count
- String::alternator - Returns given parameters by turns
- String::formatMoney - Format amount of money based on locale
- String::formatFilesize - Format filesize in bytes to a more readable version
- String::random - Returns random string in wanted format
- String::shorten - Shortens text to length and keeps integrity of words
- String::slug - Format given string to url-friendly format

### Code Example (Laravel)

[](#code-example-laravel-1)

```
// returns '4 cars'
return String::pluralize(4, 'car', 'cars');

// returns '1.200,00 EUR' in german locale
return String::formatMoney(1200, 'EUR');

// echoes different values repeated one after another
for ($i=0; $i < 10; $i++) {
    echo String::alternator('one', 'two', 'three');
}

// you may also use arrays as input for alternator
for ($i=0; $i < 10; $i++) {
    echo String::alternator(array('one', 'two', 'three'));
}
```

License
-------

[](#license)

Intervention Helper Class is licensed under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% 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 ~67 days

Recently: every ~114 days

Total

10

Last Release

4251d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.0.3PHP &gt;=5.3.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d172b42b2c5b53e71e56589fed3fb3467234a1c266d31b697b1d7b451f4cfe8?d=identicon)[olivervogel](/maintainers/olivervogel)

---

Top Contributors

[![olivervogel](https://avatars.githubusercontent.com/u/884642?v=4)](https://github.com/olivervogel "olivervogel (42 commits)")[![baileylo](https://avatars.githubusercontent.com/u/145345?v=4)](https://github.com/baileylo "baileylo (1 commits)")[![mul14](https://avatars.githubusercontent.com/u/113989?v=4)](https://github.com/mul14 "mul14 (1 commits)")

---

Tags

laravelhelperstringdate

### Embed Badge

![Health badge](/badges/intervention-helper/health.svg)

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

###  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)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[maherelgamil/arabicdatetime

Easy and useful tool to generate arabic or hijri date with multi-language support for laravel

414.5k](/packages/maherelgamil-arabicdatetime)

PHPackages © 2026

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