SUKOHI / Gacha by Sukohi

A PHP package mainly developed for Laravel to generate random string consisting of alphabets and(or) numeric characters.
37
0
2
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

Gacha

A PHP package mainly developed for Laravel to generate random string consisting of alphabets and(or) numeric characters.

Installation&setting for Laravel

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',
)

Usage

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');