From 163c57c600f597c0dc6aae9edf7d33921b20911b Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Mon, 22 Jun 2020 22:27:21 -0500 Subject: [PATCH] moon testing --- app/Http/Controllers/Moons/MoonsController.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/Http/Controllers/Moons/MoonsController.php b/app/Http/Controllers/Moons/MoonsController.php index 29e70621e..6e0ce63ef 100644 --- a/app/Http/Controllers/Moons/MoonsController.php +++ b/app/Http/Controllers/Moons/MoonsController.php @@ -246,11 +246,10 @@ class MoonsController extends Controller //Check if someone is currently renting the moon if($moon->rental_type == 'In Alliance' || $moon->rental_type == 'Out of Alliance') { $rentalTemp = new Carbon($moon->rental_until); - dd($rentalTemp); $rentalEnd = $rentalTemp->format('m-d'); //Setup the correct color for the table - if($rentalTemp->diffInDays($today) < 3 && $today->lessThan($rentalTemp)) { + if($rentalTemp->diffInDays(Carbon::now()) < 3 && $today->lessThan($rentalTemp)) { $color = 'table-warning'; } else if($today->lessThan($rentalTemp)) { $color = 'table-danger'; @@ -292,15 +291,9 @@ class MoonsController extends Controller 'Worth' => number_format($moon->moon_worth, 0, ".", ","), 'RentalEnd' => $rentalEnd, 'RowColor' => $color, - 'Type' => $moon->rental_type, - 'Difference' => $rentalTemp->diffInDays($today), - 'Paid' => $moon->paid, - 'Until' => $moon->rental_until, ]); } - dd($table); - //Pass the data to the view return view('moons.user.moon')->with('table', $table); }