/** * Execute the command. * * @return void */ public function handle() { $secret = substr(sha1(time() . mt_rand()), 0, 40); $this->clients->create($this->argument('name'), $this->argument('client_id'), ($public = $this->option('public')) ? '' : $secret); if (!$public) { $this->info("Here is the key for your new client:"); $this->comment($secret); } else { $this->info("Your new client is ready"); } }
/** * Execute the console command. * * @return mixed */ public function fire() { $clientName = $this->argument('clientName'); $clientId = $this->argument('clientId'); $clientSecret = $this->argument('clientSecret'); $this->clientRepo->create($clientName, $clientId, $clientSecret); $this->info('Client created successfully'); $this->info('Client Name: ' . $clientName); $this->info('Client ID: ' . $clientId); $this->info('Client Secret: ' . $clientSecret); }