moons controller

This commit is contained in:
2019-05-05 21:21:59 -05:00
parent 80d67df04c
commit b5327e3886
3 changed files with 17 additions and 3 deletions

View File

@@ -110,6 +110,7 @@ class MoonsAdminController extends Controller
'renter' => 'required',
'date' => 'required',
'contact' => 'required',
'paid' => 'required',
]);
//Take the contact name and create a character id from it
@@ -157,6 +158,7 @@ class MoonsAdminController extends Controller
'Contact' => $contact,
'Price' => $price['alliance'],
'Type' => 'alliance',
'Paid' => $request->paid,
]);
} else {
MoonRental::insert([
@@ -168,6 +170,7 @@ class MoonsAdminController extends Controller
'Contact' => $contact,
'Price' => $price['outofalliance'],
'Type' => 'outofalliance',
'Paid' => $request->paid,
]);
}
@@ -277,7 +280,7 @@ class MoonsAdminController extends Controller
$moon = $str_array[2];
//Update the paid status of the moon
Moon::where([
MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $moon,

View File

@@ -2,12 +2,13 @@
namespace App\Http\Controllers;
//Internal Library
use Auth;
use DB;
use Illuminate\Http\Request;
use Carbon\Carbon;
//Models
use App\Models\Moon\Config;
use App\Models\Moon\ItemComposition;
use App\Models\Moon\Moon;
@@ -15,6 +16,7 @@ use App\Models\Moon\OrePrice;
use App\Models\Moon\Price;
use App\Models\MoonRent\MoonRental;
//Library
use App\Library\Moons\MoonCalc;
class MoonsController extends Controller