Skip to content

Commit

Permalink
fixed wrong count of non-subscribers, it also counted admins
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSchmidtHansen committed Mar 15, 2015
1 parent d97084c commit 3636ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function getUsers()
$title = 'Users';
$users = User::where('admin', '=', 0)->paginate(15);
$total_users = User::where('admin', '=', 0)->count();
$total_active_subscribers = User::where('stripe_active', '=', 1)->count();
$total_active_subscribers = User::where('stripe_active', '=', 1)->where('admin', '=', 0)->count();
$total_non_subscribers = $total_users - $total_active_subscribers;
return view('admin.users', compact('title', 'users', 'total_users', 'total_active_subscribers', 'total_non_subscribers'));
}
Expand Down

0 comments on commit 3636ee0

Please sign in to comment.