diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index aa979a65..4f6f57ce 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -31,46 +31,47 @@ class HomeController extends Controller ]); } - public static function CreditsLeftBox(){ + public static function CreditsLeftBox(){ $usage = 0; - $CREDITS_DISPLAY_NAME = Configuration::getValueByKey('CREDITS_DISPLAY_NAME'); + foreach (Auth::user()->servers as $server){ $usage += $server->product->price; } - + if(Auth::user()->Credits() > 0.01 and $usage > 0){ - $Days = number_format((Auth::user()->Credits()*30)/$usage,2,'.',''); - $Hours = number_format(Auth::user()->Credits()/($usage/30/24),2,'.',''); - echo ' -