示例#1
0
 public function accountCharts()
 {
     $accounts = Account::get();
     $AC = new AccountController();
     $date = new Carbon('today');
     $count = 0;
     foreach ($accounts as $account) {
         Auth::loginUsingId($account->fireflyuser_id);
         // remove cached entry:
         $key = cacheKey('Account', 'homeOverviewChart', $account->id, $date);
         Cache::forget($key);
         $AC->homeOverviewChart($account->id, $date);
         $count++;
         Auth::logout();
     }
     return 'Regenerated ' . $count . ' account charts.';
 }