/** * Count all tokens */ public function countTokens() { $number = 0; $tokensAccount = TokensAccountManager::where('guid', \Auth::user()->guid)->get(); foreach ($tokensAccount as $tokenAccount) { $number += $tokenAccount->quantity; } return $number; }
function auth() { return \App\Library\Auth::mySelf(); }