| 1 | <?php  | 
            ||
| 7 | class AlphabetGenerateCommand extends Command  | 
            ||
| 8 | { | 
            ||
| 9 | /**  | 
            ||
| 10 | * The name and signature of the console command.  | 
            ||
| 11 | *  | 
            ||
| 12 | * @var string  | 
            ||
| 13 | */  | 
            ||
| 14 | protected $signature = 'hashid:alphabet  | 
            ||
| 15 |         {--c|characters=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ : Use custom characters} | 
            ||
| 16 |         {--t|times=1 : Times to generate}'; | 
            ||
| 17 | |||
| 18 | /**  | 
            ||
| 19 | * The console command description.  | 
            ||
| 20 | *  | 
            ||
| 21 | * @var string  | 
            ||
| 22 | */  | 
            ||
| 23 | protected $description = 'Generate a random alphabet for Hashid encoding';  | 
            ||
| 24 | |||
| 25 | /**  | 
            ||
| 26 | * Execute the console command.  | 
            ||
| 27 | *  | 
            ||
| 28 | * @return mixed  | 
            ||
| 29 | */  | 
            ||
| 30 | 1 | public function handle()  | 
            |
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * Generate random alphabet.  | 
            ||
| 41 | *  | 
            ||
| 42 | * @return string  | 
            ||
| 43 | */  | 
            ||
| 44 | 1 | protected function generateRandomAlphabet($characters)  | 
            |
| 48 | }  | 
            ||
| 49 |