diff --git a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php index ece8ff17e..b0a4ca322 100644 --- a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php +++ b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php @@ -167,6 +167,7 @@ class MiningTaxesController extends Controller 'Ytterbite', ]; + //Get all of the system names from the database by plucking all the non-rented moon system names $systems = AllianceMoon::where([ 'rented' => 'No', ])->pluck('system_name')->unique()->toArray(); @@ -176,6 +177,7 @@ class MiningTaxesController extends Controller 'rented' => 'No', ])->get(); + //Cycle through all of the moons to create arrays of data foreach($allyMoons as $moon) { $ores = AllianceMoonOre::where([ 'moon_id' => $moon->moon_id, diff --git a/resources/views/miningtax/user/display/moons/availablemoons.blade.php b/resources/views/miningtax/user/display/moons/availablemoons.blade.php index b4a8109b7..7b3a6a71b 100644 --- a/resources/views/miningtax/user/display/moons/availablemoons.blade.php +++ b/resources/views/miningtax/user/display/moons/availablemoons.blade.php @@ -138,14 +138,14 @@ @endif - {{ number_format($moon->worth_amount, 0, ".", ",") }} - {{ number_format($moon->rental_amount, 0, ".", ",") }} + {{ number_format($moon['worth_amount'], 0, ".", ",") }} + {{ number_format($moon['rental_amount'], 0, ".", ",") }} {!! Form::open(['action' => 'MiningTaxes\MiningTaxesController@DisplayMoonRentalForm', 'method' => 'POST']) !!} - {{ Form::hidden('moon_id', $moon->moon_id) }} - {{ Form::hidden('moon_name', $moon->moon_name) }} - {{ Form::hidden('worth_amount', $moon->worth_amount) }} - {{ Form::hidden('rental_amount', $moon->rental_amount) }} + {{ Form::hidden('moon_id', $moon['moon_id']) }} + {{ Form::hidden('moon_name', $moon['moon_name']) }} + {{ Form::hidden('worth_amount', $moon['worth_amount']) }} + {{ Form::hidden('rental_amount', $moon['rental_amount']) }} {{ Form::submit('Rent', ['class' => 'btn btn-danger']) }} {!! Form::close() !!}