Helper Features For Development with Laravel
- The
genius-helper
package the Helper Library for laravel development - Most of the method and features useful in development
- Custom Command For Cache Clear All
- API Standard For Date
- Date To Epoch
- Epoch To Date
- Hour To Epoch
- Epoch To Hour
- Date String To Date with Format
- Helper Method
- Font Detect
- Is Myanmar Font?
- zawGyiToUnicode
- UnicodeToZawGyi
- Get Random Digit
- Get File with File Format String
Require the htinlynn/genius
package in your composer.json
and update your dependencies:
$ composer require htinlynn/genius-helper
- To Clear cache all of the
- All caches of config, route, view and cache are cleared.
- And config clear and cache
Command (short)
$ php artisan all:
Command (Long)
$ php artisan all:clearandcache
Init the class
$geniusHelper = new \Genius\Services\GeniusService();
Dependency injection on construct or specific function
protected $geniusInterface;
public function __construct(Genius\Contacts\GeniusInterface $geniusInterface)
{
$this->geniusInterface = $geniusInterface;
}
Available Method
$geniusHelper->randomDigit($length,$count);
$geniusHelper->formatBytes($size);
$geniusHelper->zawGyiToUnicode($content);
$geniusHelper->unicodeToZawGyi($content);
Facades
Genius::randomDigit($length,$count);
Genius::formatBytes($size);
Genius::formatBytes($size);
Genius::formatBytes($size);
Need to use before using my package method
use GeniusHelper;
Available Method
$this->dateToEpoch($dateString);
$this->hourToEpoch($hourString);
$this->epochToHour($epochString);
$this->epochToDate($epochString);
$this->toDateFormat($dateString);
$this->epochToDateByDateFormat($epochString,$format);
- Test Case
- Contribution Guide
- Version Release Note
- Ko Nay Lin Aung [myanfont] (https://github.com/stevenay/myanfont) PHP Library
Noted: All Date Time String are using UTC timezone Request Parameter And Respond Data are using UTC timezone
Released under the MIT License, see LICENSE.