moon rental pages

This commit is contained in:
2021-07-09 01:20:34 -05:00
parent b310799bf0
commit 7b26a021e1
2 changed files with 8 additions and 6 deletions

View File

@@ -167,6 +167,7 @@ class MiningTaxesController extends Controller
'Ytterbite', 'Ytterbite',
]; ];
//Get all of the system names from the database by plucking all the non-rented moon system names
$systems = AllianceMoon::where([ $systems = AllianceMoon::where([
'rented' => 'No', 'rented' => 'No',
])->pluck('system_name')->unique()->toArray(); ])->pluck('system_name')->unique()->toArray();
@@ -176,6 +177,7 @@ class MiningTaxesController extends Controller
'rented' => 'No', 'rented' => 'No',
])->get(); ])->get();
//Cycle through all of the moons to create arrays of data
foreach($allyMoons as $moon) { foreach($allyMoons as $moon) {
$ores = AllianceMoonOre::where([ $ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id, 'moon_id' => $moon->moon_id,

View File

@@ -138,14 +138,14 @@
<td></td> <td></td>
<td></td> <td></td>
@endif @endif
<td>{{ number_format($moon->worth_amount, 0, ".", ",") }}</td> <td>{{ number_format($moon['worth_amount'], 0, ".", ",") }}</td>
<td>{{ number_format($moon->rental_amount, 0, ".", ",") }}</td> <td>{{ number_format($moon['rental_amount'], 0, ".", ",") }}</td>
<td> <td>
{!! Form::open(['action' => 'MiningTaxes\MiningTaxesController@DisplayMoonRentalForm', 'method' => 'POST']) !!} {!! Form::open(['action' => 'MiningTaxes\MiningTaxesController@DisplayMoonRentalForm', 'method' => 'POST']) !!}
{{ Form::hidden('moon_id', $moon->moon_id) }} {{ Form::hidden('moon_id', $moon['moon_id']) }}
{{ Form::hidden('moon_name', $moon->moon_name) }} {{ Form::hidden('moon_name', $moon['moon_name']) }}
{{ Form::hidden('worth_amount', $moon->worth_amount) }} {{ Form::hidden('worth_amount', $moon['worth_amount']) }}
{{ Form::hidden('rental_amount', $moon->rental_amount) }} {{ Form::hidden('rental_amount', $moon['rental_amount']) }}
{{ Form::submit('Rent', ['class' => 'btn btn-danger']) }} {{ Form::submit('Rent', ['class' => 'btn btn-danger']) }}
{!! Form::close() !!} {!! Form::close() !!}
</td> </td>