moons controller

This commit is contained in:
2020-02-23 20:42:49 -06:00
parent cf357d9a5b
commit afe989f0e5

View File

@@ -35,16 +35,9 @@ class MoonsController extends Controller
$moons = array(); $moons = array();
//Get all of the alliance moons from the database //Get all of the alliance moons from the database
$moonsTemp = DB::table('alliance_moons')->orderBy('System', 'asc')->get(); $moonsTemp = AllianceMoon::orderBy('System', 'asc')->distinct()->get(['System']);
//Get the unique systems from the database dd($moonsTemp);
$systems = AllianceMoon::pluck('System')->groupBy('System')->toArray();
dd($systems);
foreach($systems as $system) {
}
return view('moons.user.allmoons')->with('moons', $moons) return view('moons.user.allmoons')->with('moons', $moons)
->with('systems', $systems); ->with('systems', $systems);