Package Data | |
---|---|
Maintainer Username: | Sukohi |
Maintainer Contact: | capilano.sukohi@gmail.com (Sukohi) |
Package Create Date: | 2014-10-20 |
Package Last Update: | 2015-04-24 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-22 03:10:00 |
Package Statistics | |
---|---|
Total Downloads: | 37 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
A PHP package mainly developed for Laravel to generate random string consisting of alphabets and(or) numeric characters.
After installation using composer, add the followings to the array in app/config/app.php
'providers' => array(
...Others...,
'Sukohi\Gacha\GachaServiceProvider',
)
Also
'aliases' => array(
...Others...,
'Gacha' => 'Sukohi\Gacha\Facades\Gacha',
)
Basic
echo Gacha::generate();
with Length (Default: 7)
echo Gacha::generate(10);
Only nemeric characters
echo Gacha::generate(5)->numeric();
Only alphabets
echo Gacha::generate(10)->alphabet();
Upper Case
echo Gacha::generate(7)->upperCase();
echo Gacha::generate()->alphabet()->upperCase();
Lower Case
echo Gacha::generate(15)->alphabet()->lowerCase();
Specific characters
echo Gacha::generate(8)->characters('abcd');