moons controller
This commit is contained in:
@@ -46,6 +46,15 @@ class MoonsController extends Controller
|
|||||||
->with('moons', $moons);
|
->with('moons', $moons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to display alliance moons of a particular system
|
||||||
|
*/
|
||||||
|
public function displayMoonsSystem($system) {
|
||||||
|
$moons = AllianceMoon::where(['System' => $system])->get();
|
||||||
|
|
||||||
|
return view('moons.user.allmoons.system')->with('moons', $moons);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to display the moons and pass data to the blade template
|
* Function to display the moons and pass data to the blade template
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
@foreach($systems as $system)
|
@foreach($systems as $system)
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ $system}}">{{ $system }}</a>
|
<a class="nav-link" href="#">{{ $system }}</a>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content" id="myTabContent">
|
<div class="tab-content" id="myTabContent">
|
||||||
@foreach($systems as $system)
|
@foreach($systems as $system)
|
||||||
<div class="tab-pane fade" id="{{ $system }}" role="tabpanel" aria-labelledby="{{ $system}}-tab">
|
<div class="tab-pane fade" id="{{ $system }}" role="tabpanel" aria-labelledby="{{ $system }}-tab">
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
|
|||||||
43
resources/views/moons/user/allmoons/system.blade.php
Normal file
43
resources/views/moons/user/allmoons/system.blade.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
@extends('layouts.b4')
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-striped table-bordered">
|
||||||
|
<thead>
|
||||||
|
<th>Location</th>
|
||||||
|
<th>Corporation</th>
|
||||||
|
<th>Structure Name</th>
|
||||||
|
<th>First Ore</th>
|
||||||
|
<th>First Quantity</th>
|
||||||
|
<th>Second Ore</th>
|
||||||
|
<th>Second Quantity</th>
|
||||||
|
<th>Third Ore</th>
|
||||||
|
<th>Third Quantity</th>
|
||||||
|
<th>Fourth Ore</th>
|
||||||
|
<th>Fourth Quantity</th>
|
||||||
|
<th>Available</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($moons as $moon)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $moon->System . " - " . $moon->Planet . " - " . $moon->Moon }}</td>
|
||||||
|
<td>{{ $moon->Corporation }}</td>
|
||||||
|
<td>{{ $moon->StructureName }}</td>
|
||||||
|
<td>{{ $moon->FirstOre }}</td>
|
||||||
|
<td>{{ $moon->FirstQuantity }}</td>
|
||||||
|
<td>{{ $moon->SecondOre }}</td>
|
||||||
|
<td>{{ $moon->SecondQuantity }}</td>
|
||||||
|
<td>{{ $moon->ThirdOre }}</td>
|
||||||
|
<td>{{ $moon->ThirdQuantity }}</td>
|
||||||
|
<td>{{ $moon->FourthOre }}</td>
|
||||||
|
<td>{{ $moon->FourthQuantity }}</td>
|
||||||
|
@if($moon->Available == 1)
|
||||||
|
<td>Yes</td>
|
||||||
|
@else
|
||||||
|
<td>No</td>
|
||||||
|
@endif
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -130,6 +130,7 @@ Route::group(['middleware' => ['auth']], function(){
|
|||||||
Route::get('/moons/display/form/worth', 'Moons\MoonsController@displayTotalWorthForm');
|
Route::get('/moons/display/form/worth', 'Moons\MoonsController@displayTotalWorthForm');
|
||||||
Route::post('/moons/worth', 'Moons\MoonsController@displayTotalWorth');
|
Route::post('/moons/worth', 'Moons\MoonsController@displayTotalWorth');
|
||||||
Route::get('/moons/display/all', 'Moons\MoonsController@displayMoons');
|
Route::get('/moons/display/all', 'Moons\MoonsController@displayMoons');
|
||||||
|
Route::get('/moons/display/{system}', 'Moons\MoonsController@displayMoonsSystem');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moon Admin Controller display pages
|
* Moon Admin Controller display pages
|
||||||
|
|||||||
Reference in New Issue
Block a user