diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 4f6f57ce..b2c4384a 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -37,25 +37,24 @@ class HomeController extends Controller 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,'.',''); + + if($days >= 15){ + $bg = "success"; + }elseif ($days >= 8 && $days <= 14){ + $bg = "warning"; + }elseif ($days <= 7){ + $bg = "danger"; + } + echo '