htinlynn/genius-helper
Composer 安装命令:
composer require htinlynn/genius-helper
包简介
service for laravel helper method
README 文档
README
Helper Features For Development with Laravel
About
- The
genius-helperpackage the Helper Library for laravel development - Most of the method and features useful in development
Features
- 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
Installation
Require the htinlynn/genius package in your composer.json and update your dependencies:
$ composer require htinlynn/genius-helper
Usage For Custom Command
- 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
Usage For Helper Class
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);
Trait Method
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);
Improvement
- Test Case
- Contribution Guide
- Version Release Note
Credit
- 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
License
Released under the MIT License, see LICENSE.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-31