moons controller
This commit is contained in:
@@ -110,6 +110,7 @@ class MoonsAdminController extends Controller
|
|||||||
'renter' => 'required',
|
'renter' => 'required',
|
||||||
'date' => 'required',
|
'date' => 'required',
|
||||||
'contact' => 'required',
|
'contact' => 'required',
|
||||||
|
'paid' => 'required',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//Take the contact name and create a character id from it
|
//Take the contact name and create a character id from it
|
||||||
@@ -157,6 +158,7 @@ class MoonsAdminController extends Controller
|
|||||||
'Contact' => $contact,
|
'Contact' => $contact,
|
||||||
'Price' => $price['alliance'],
|
'Price' => $price['alliance'],
|
||||||
'Type' => 'alliance',
|
'Type' => 'alliance',
|
||||||
|
'Paid' => $request->paid,
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
MoonRental::insert([
|
MoonRental::insert([
|
||||||
@@ -168,6 +170,7 @@ class MoonsAdminController extends Controller
|
|||||||
'Contact' => $contact,
|
'Contact' => $contact,
|
||||||
'Price' => $price['outofalliance'],
|
'Price' => $price['outofalliance'],
|
||||||
'Type' => 'outofalliance',
|
'Type' => 'outofalliance',
|
||||||
|
'Paid' => $request->paid,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +280,7 @@ class MoonsAdminController extends Controller
|
|||||||
$moon = $str_array[2];
|
$moon = $str_array[2];
|
||||||
|
|
||||||
//Update the paid status of the moon
|
//Update the paid status of the moon
|
||||||
Moon::where([
|
MoonRental::where([
|
||||||
'System' => $system,
|
'System' => $system,
|
||||||
'Planet' => $planet,
|
'Planet' => $planet,
|
||||||
'Moon' => $moon,
|
'Moon' => $moon,
|
||||||
|
|||||||
@@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
//Internal Library
|
||||||
use Auth;
|
use Auth;
|
||||||
use DB;
|
use DB;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
//Models
|
||||||
use App\Models\Moon\Config;
|
use App\Models\Moon\Config;
|
||||||
use App\Models\Moon\ItemComposition;
|
use App\Models\Moon\ItemComposition;
|
||||||
use App\Models\Moon\Moon;
|
use App\Models\Moon\Moon;
|
||||||
@@ -15,6 +16,7 @@ use App\Models\Moon\OrePrice;
|
|||||||
use App\Models\Moon\Price;
|
use App\Models\Moon\Price;
|
||||||
use App\Models\MoonRent\MoonRental;
|
use App\Models\MoonRent\MoonRental;
|
||||||
|
|
||||||
|
//Library
|
||||||
use App\Library\Moons\MoonCalc;
|
use App\Library\Moons\MoonCalc;
|
||||||
|
|
||||||
class MoonsController extends Controller
|
class MoonsController extends Controller
|
||||||
|
|||||||
@@ -14,13 +14,22 @@
|
|||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
{{ Form::label('renter', 'Renter') }}
|
{{ Form::label('renter', 'Renter') }}
|
||||||
{{ Form::text('renter', '', ['class' => 'form-control', 'placeholder' => 'Renter']) }}
|
{{ Form::text('renter', '', ['class' => 'form-control', 'placeholder' => 'Renter']) }}
|
||||||
{{ Form::label('contact', 'Contact') }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
{{ Form::label('contact', 'Contact') }}
|
||||||
{{ Form::text('contact', '', ['class' => 'form-control', 'placeholder' => 'Character']) }}
|
{{ Form::text('contact', '', ['class' => 'form-control', 'placeholder' => 'Character']) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
{{ Form::label('date', 'Rental End Date') }}
|
{{ Form::label('date', 'Rental End Date') }}
|
||||||
{{ Form::date('date', \Carbon\Carbon::now()->addMonth(), ['class' => 'form-control']) }}
|
{{ Form::date('date', \Carbon\Carbon::now()->addMonth(), ['class' => 'form-control']) }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
Paid?<br>
|
||||||
|
{{ Form::label('paid', 'No') }}
|
||||||
|
{{ Form::radio('paid', 'No', true) }}
|
||||||
|
{{ Form::label('paid', 'Yes') }}
|
||||||
|
{{ Form::radio('paid', 'Yes') }}
|
||||||
|
</div>
|
||||||
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
|
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user