Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Console\Commands;
- use Illuminate\Console\Command;
- class SayWinner extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'winner';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Get the random winner!';
- /**
- * Users
- * @var [type]
- */
- private $users = [
- 'Tamaz Bagdavadze',
- 'Zura Gabievi',
- 'Guram Gunia',
- 'Levan Lotuashvili',
- 'Mako',
- 'Landish',
- 'Giorgi Bakashvili',
- 'Shalva Gelenidze',
- 'Shota Jolbordi',
- 'Dito Orkodashvili',
- 'Davit Khurtsidze',
- 'Giorgi Leivdze',
- 'Sandro Dolidze',
- 'Irakli the 5th',
- 'Guram Sutidze',
- 'Nana',
- 'Giorgi Goginashvili',
- 'Mariam Vardanidze',
- 'Giorgi Eufshi',
- 'Lasha Mgvdliashvili',
- 'Giorgi Beraia',
- 'Abesalomi Gogatishvili',
- 'Beqa Bendeliani',
- 'Giorgi Giorkhelidze',
- 'Levan Lekishvili',
- 'Ana Chikvaidze',
- 'Lasha Sumbadze',
- 'Ilya Gokadze',
- 'Ani Jujunashvili',
- 'Eka Vatsadze',
- 'Sergi Biganashvili',
- 'Giorgi Khachidze',
- 'Giorgi Pailodze',
- 'Mariam Komaxide',
- 'Salikh Gurgenidze',
- 'Merab Kutalia',
- 'Giorgi Monaselidze'
- ];
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- shuffle($this->users);
- }
- /**
- * Execute the console command.
- *
- * @return mixed
- */
- public function handle()
- {
- sleep(2);
- $this->info('Thinking...');
- sleep(6);
- $this->info('Hmmmmm... And the Laracasts one month subscription goes to...');
- sleep(3);
- $this->info( last($this->users) );
- sleep(1);
- $this->info( 'Congrats!' );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement