moon rental update for admin

This commit is contained in:
2019-04-29 03:10:04 -05:00
parent e27519a8e9
commit ed7035f030
2 changed files with 18 additions and 1 deletions
@@ -175,6 +175,9 @@ class MoonsAdminController extends Controller
* Function to display the moons to admins
*/
public function displayMoonsAdmin() {
$lookup = new LookupHelper;
$contact = '';
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc();
//Update the prices for the moon
@@ -211,7 +214,8 @@ class MoonsAdminController extends Controller
if(!isset($contact->Contact)) {
$contact = 'None';
} else {
$contact = $contact->Contact;
//Get the name of the character
$contact = $lookup->CharacterName($contact->Contact);
}
//Set the color for the table
+13
View File
@@ -15,6 +15,19 @@ use App\Models\Lookups\CorporationToAlliance;
class LookupHelper {
public function CharacterName($charId) {
$name = '';
$temp = CharacterToCorporation::where(['character_id' => $charId])->get(['character_name']);
if(!isset($temp->character_name)) {
$name = 'None';
} else {
$name = $temp->character_name;
}
return $name;
}
//Create a character id from a character name
public function CharacterNameToId($character) {
//Setup Eseye Configuration