diff --git a/app/Http/Controllers/Moons/MoonsController.php b/app/Http/Controllers/Moons/MoonsController.php
index d21bfc726..0cafeabaf 100644
--- a/app/Http/Controllers/Moons/MoonsController.php
+++ b/app/Http/Controllers/Moons/MoonsController.php
@@ -46,6 +46,15 @@ class MoonsController extends Controller
->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
*/
diff --git a/resources/views/moons/user/allmoons.blade.php b/resources/views/moons/user/allmoons.blade.php
index e69e4369b..365dc39b1 100644
--- a/resources/views/moons/user/allmoons.blade.php
+++ b/resources/views/moons/user/allmoons.blade.php
@@ -6,13 +6,13 @@
@foreach($systems as $system)
-
+
| Location |
diff --git a/resources/views/moons/user/allmoons/system.blade.php b/resources/views/moons/user/allmoons/system.blade.php
new file mode 100644
index 000000000..0a7405df1
--- /dev/null
+++ b/resources/views/moons/user/allmoons/system.blade.php
@@ -0,0 +1,43 @@
+@extends('layouts.b4')
+@section('content')
+
+
+
+ | Location |
+ Corporation |
+ Structure Name |
+ First Ore |
+ First Quantity |
+ Second Ore |
+ Second Quantity |
+ Third Ore |
+ Third Quantity |
+ Fourth Ore |
+ Fourth Quantity |
+ Available |
+
+
+ @foreach($moons as $moon)
+
+ | {{ $moon->System . " - " . $moon->Planet . " - " . $moon->Moon }} |
+ {{ $moon->Corporation }} |
+ {{ $moon->StructureName }} |
+ {{ $moon->FirstOre }} |
+ {{ $moon->FirstQuantity }} |
+ {{ $moon->SecondOre }} |
+ {{ $moon->SecondQuantity }} |
+ {{ $moon->ThirdOre }} |
+ {{ $moon->ThirdQuantity }} |
+ {{ $moon->FourthOre }} |
+ {{ $moon->FourthQuantity }} |
+ @if($moon->Available == 1)
+ Yes |
+ @else
+ No |
+ @endif
+
+ @endforeach
+
+
+
+@endsection
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index d64e52861..3731bcc78 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -130,6 +130,7 @@ Route::group(['middleware' => ['auth']], function(){
Route::get('/moons/display/form/worth', 'Moons\MoonsController@displayTotalWorthForm');
Route::post('/moons/worth', 'Moons\MoonsController@displayTotalWorth');
Route::get('/moons/display/all', 'Moons\MoonsController@displayMoons');
+ Route::get('/moons/display/{system}', 'Moons\MoonsController@displayMoonsSystem');
/**
* Moon Admin Controller display pages