app/Console/Commands/AllFanGroup.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        $accountModel = new Account();
        $accounts = $accountModel->get();
        $this->output->progressStart($accounts->count());
        foreach ($accounts as $account) {
            $this->call('sync:groups', array('account_id' => $account->id));
            $this->output->progressAdvance();
        }
        $this->output->progressFinish();
        $this->info("\n同步完成。");
    }
public function handle ( ) { $ accountModel = new Account ( ) ; $ accounts = $ accountModel -> get ( ) ; $ this -> output -> progressStart ( $ accounts -> count ( ) ) ; foreach ( $ accounts as $ account ) { $ this -> call ( 'sync:groups' , array ( 'account_id' => $ account -> id ) ) ; $ this -> output -> progressAdvance ( ) ; } $ this -> output -> progressFinish ( ) ; $ this -> info ( " \n 同步完成。"); }
Execute the console command.
Execute the console command .