update to moons controller
This commit is contained in:
@@ -44,7 +44,8 @@ class MoonsAdminController extends Controller
|
|||||||
'planet' => 'required',
|
'planet' => 'required',
|
||||||
'moon' => 'required',
|
'moon' => 'required',
|
||||||
'renter' => 'required',
|
'renter' => 'required',
|
||||||
'date' => 'required'
|
'date' => 'required',
|
||||||
|
'contact' => 'required',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$date = new Carbon($request->date . '00:00:01');
|
$date = new Carbon($request->date . '00:00:01');
|
||||||
@@ -56,6 +57,7 @@ class MoonsAdminController extends Controller
|
|||||||
])->update([
|
])->update([
|
||||||
'RentalCorp' => $request->renter,
|
'RentalCorp' => $request->renter,
|
||||||
'RentalEnd' => $date,
|
'RentalEnd' => $date,
|
||||||
|
'Contact' => $request->contact,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return redirect('/moons/display')->with('success', 'Moon Updated');
|
return redirect('/moons/display')->with('success', 'Moon Updated');
|
||||||
@@ -138,7 +140,7 @@ class MoonsAdminController extends Controller
|
|||||||
$spm = $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon;
|
$spm = $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon;
|
||||||
$rentalEnd = new Carbon($moon->RentalEnd);
|
$rentalEnd = new Carbon($moon->RentalEnd);
|
||||||
$rentalEnd = $rentalEnd->format('m-d');
|
$rentalEnd = $rentalEnd->format('m-d');
|
||||||
|
|
||||||
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
|
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
|
||||||
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
|
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
|
||||||
//Add the data to the html string to be passed to the view
|
//Add the data to the html string to be passed to the view
|
||||||
|
|||||||
Reference in New Issue
Block a user