added blade for showing rented moons

This commit is contained in:
2021-07-18 00:32:34 -05:00
parent c075112810
commit bca5179cc3
2 changed files with 42 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ class MiningTaxesController extends Controller
//Get the ores for the moon
$ores = AllianceMoonOre::where([
'moon_id' => $tempMoon->moon_id,
])->get();
])->get()->toArray();
$moons->push([
'moon_id' => $tempMoon->moon_id,

View File

@@ -0,0 +1,41 @@
@extends('layouts.user.dashb4')
@section('content')
<br>
<div class="container">
<div class="card">
<div class="card-header">
<h2>Moons Currently Rented</h2>
</div>
<div class="card-body">
@if(sizeof($moons) == 0)
<h2>No moons currently rented by you or your corporation.</h2>
@else
<table class="table table-striped table-bordered">
<thead>
<th>System</th>
<th>Moon Name</th>
<th>Worth</th>
<th>Rental</th>
<th>Ores</th>
</thead>
<tbody>
@foreach($moons as $moon)
<tr>
<td>{{ $moon['system'] }}</td>
<td>{{ $moon['moon_name'] }}</td>
<td>{{ number_format($moon['worth_amount'], 2, ".", ",") }}</td>
<td>{{ number_format($moon['rental_amount'], 2, ".", ",") }}</td>
<td>
@foreach($moon['ores'] as $ore)
{{ $ore['ore_name'] }} : {{ number_format($ore['quantity'], 0, ".", ",") }}<br>
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
</div>
@endsection