htinlynn / genius-helper
service for laravel helper method
v0.4
2021-05-06 18:21 UTC
Requires
- php: >=7.1.3
- arcanedev/support: ~4.4.0
- illuminate/contracts: ~5.7.0
- illuminate/database: ~5.7.0
- illuminate/notifications: ~5.7.0
- illuminate/support: ~5.7.0
- stevenay/myanfont: dev-master
Requires (Dev)
- phpunit/phpunit: ^6.5 || ^7.0
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-10-29 05:22:51 UTC
README
Helper Features For Development with Laravel
About
- The
genius-helper
package 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.