/** * Returns the number of `unactioned users` (defined as users who are * not activated and also are not suspended or banned) as JSON. * @return JSON response */ public function notification_unactioned_users() { // Only list to admin users if (!$this->user->hasAccess('user.all')) { return View::make('api.json'); } else { $newUserCount = $this->getUnactionedUserCount(); return View::make('api.json', ['response' => $newUserCount]); } }
/** * Returns the number of `unactioned loans` (defined as loans where the * only updates have been made by the original user) as JSON. * @return JSON response */ public function notification_unactioned_loans() { // Only list to staff users if (!$this->user->hasAccess('loan.all')) { return View::make('api.json'); } else { $newLoanCount = $this->getUnactionedLoanCount(); return View::make('api.json', ['response' => $newLoanCount]); } }