moons controller
This commit is contained in:
@@ -35,20 +35,14 @@ class MoonsController extends Controller
|
|||||||
//Setup variables for moons
|
//Setup variables for moons
|
||||||
$moons = array();
|
$moons = array();
|
||||||
|
|
||||||
//Get all of the alliance moons from the database
|
//Get all of the alliance moon systems from the database
|
||||||
$systems = DB::table('alliance_moons')->select('System')->distinct()->get()->toArray();
|
$systems = DB::table('alliance_moons')->select('System')->distinct()->get()->toArray();
|
||||||
|
|
||||||
foreach($systems as $system) {
|
//Get all of the alliance moons from the database
|
||||||
$moons[$system] = null;
|
$moons = AllianceMoon::all();
|
||||||
$moonsTemp = AllianceMoon::where(['System' => $system])->get();
|
|
||||||
foreach($moonsTemp as $moon) {
|
|
||||||
array_push($moons[$system], $moon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dd($moons);
|
return view('moons.user.allmoons')->with('systems', $systems)
|
||||||
|
->with('moons', $moons);
|
||||||
return view('moons.user.allmoons');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user