Download the PHP package intervention/helper without Composer
On this page you can find all versions of the php package intervention/helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download intervention/helper
More information about intervention/helper
Files in intervention/helper
Package helper
Short Description Easier handling and formating of strings and dates
License MIT
Informations about the package helper
This package is abandoned and will no longer be maintained. I suggest using Carbon for much more advanced date functionality and the helper functions of Illuminate/Support to format text.
Intervention Helper Class (Abandoned)
Easier handling and formating of strings and dates. Made to work with Laravel 4 but runs also standalone.
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
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)
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)
License
Intervention Helper Class is licensed under the MIT License.
All versions of helper with dependencies
illuminate/support Version ~4|~5
illuminate/translation Version ~4|~5
doctrine/inflector Version 1.*