moon rental update for admin
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user