Skip to content

Commit

Permalink
add structure name to the public page
Browse files Browse the repository at this point in the history
  • Loading branch information
skiedude committed May 5, 2019
1 parent 066037d commit c9ad5c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/PublicExtraction.php
Expand Up @@ -30,6 +30,8 @@ public function index($corporation_id, $slug) {
if($structure->corporation_id != $corporation_id) {
continue;
}
$structure_name = Structure::find($structure->structure_id);
$structure_name = $structure_name->structure_name;
$extraction = Structure::find($structure->structure_id)->extractions;
$data = ExtractionData::where('structure_id', $structure->structure_id)->first();
if(!is_null($extraction)) {
Expand All @@ -42,6 +44,7 @@ public function index($corporation_id, $slug) {
$extraction->ores = "None";
$extraction->fracture_pref = "auto_fracture";
}
$extraction->structure_name = $structure_name;
array_push($extractions, $extraction);
}
}
Expand Down
2 changes: 2 additions & 0 deletions resources/views/public_extractions.blade.php
Expand Up @@ -13,6 +13,7 @@
<thead>
<tr>
<th>Location</th>
<th>Structure Name</th>
<th>Ores</th>
<th>Estimated Value</th>
<th>Fracture Time</th>
Expand All @@ -21,6 +22,7 @@
@foreach($extractions as $extraction)
<tr>
<td>{{$extraction->moon_name}}</td>
<td>{{$extraction->structure_name}}</td>
<td>{{$extraction->ores}}</td>
<td>${{number_format($extraction->value)}}</td>
<td>@if($extraction->fracture_pref == 'auto_fracture') {{$extraction->natural_decay_time}} @else {{$extraction->chunk_arrival_time}} @endif</td>
Expand Down

0 comments on commit c9ad5c8

Please sign in to comment.