moon admin controller
This commit is contained in:
@@ -199,6 +199,8 @@ class MoonsAdminController extends Controller
|
|||||||
'Moon' => $moon->Moon,
|
'Moon' => $moon->Moon,
|
||||||
])->first();
|
])->first();
|
||||||
|
|
||||||
|
dd($rental);
|
||||||
|
|
||||||
//Check if their is a current rental for a moon going on
|
//Check if their is a current rental for a moon going on
|
||||||
if($rental == false) {
|
if($rental == false) {
|
||||||
//If we don't find a rental record, mark the moon as not paid
|
//If we don't find a rental record, mark the moon as not paid
|
||||||
@@ -222,21 +224,6 @@ class MoonsAdminController extends Controller
|
|||||||
$contact = $lookup->CharacterName($rental->Contact);
|
$contact = $lookup->CharacterName($rental->Contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
//We need the contact information in character name format for the view
|
|
||||||
$contact = MoonRental::where([
|
|
||||||
'System' => $moon->System,
|
|
||||||
'Planet' => $moon->Planet,
|
|
||||||
'Moon' => $moon->Moon,
|
|
||||||
'RentalEnd' => $moon->RentalEnd,
|
|
||||||
])->first();
|
|
||||||
|
|
||||||
if($contact != null) {
|
|
||||||
$contact = $contact->toArray();
|
|
||||||
$contact = $lookup->CharacterName($contact['Contact']);
|
|
||||||
} else {
|
|
||||||
$contact = 'None';
|
|
||||||
}
|
|
||||||
|
|
||||||
//Set the color for the table
|
//Set the color for the table
|
||||||
$today = Carbon::now();
|
$today = Carbon::now();
|
||||||
if($rentalTemp->diffInDays($today) < 3 ) {
|
if($rentalTemp->diffInDays($today) < 3 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user