/** * Execute the console command. * * @return mixed */ public function handle() { $className = $this->argument('classname'); $amount = $this->argument('amount'); $action = $this->option('action'); if (!in_array($action, $this->options)) { $this->error('action not found!'); return false; } $this->info('will ' . $action . ' ' . $amount . ' of every view counter'); $countSync = new CounterSync(); $countSync->setViewCountBatch($className, $action, $amount); }