tohtamysh / laravel-helpers
This package is abandoned and no longer maintained.
No replacement package was suggested.
Helper function for Laravel 5
v4.0.2
2019-03-06 08:27 UTC
Requires
- php: >=7.0
- illuminate/support: 5.*
- nesbot/carbon: ^1.26.3 || ^2.0
README
Installation
run composer
composer require tohtamysh/laravel-helpers
For Laravel < 5.5
add service provider
Register the Service Provider by adding it to your project's providers array in app.php
'providers' => array( Tohtamysh\Helper\HelperServiceProvider::class, );
add alias
'Helper' => Tohtamysh\Helper\HelperFacade::class,
Use
Get correct russian ending
example return 'домов'
$end = Helper::ending(55, 'дом', 'дома', 'домов')
Get russian date
example return 'Января'
$russian_date = Helper::russianDate('2017-01-02', 'month', true)
Reduces image size without loss of quality.
optimizeImage($filePath)
Format time
example return '01:20'
$end = Helper::timeFormat(80)