コード例 #1
0
ファイル: AllFanGroup.php プロジェクト: renyang9876/viease
 /**
  * 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同步完成。");
 }
コード例 #2
0
 public function get_accounts()
 {
     try {
         $user = auth()->user();
         $accounts = Account::get($user);
         return view('/accounts', ["user" => $user, "accounts" => $accounts]);
     } catch (PDOException $e) {
         die($e->getMessage());
     }
 }