This commit is contained in:
2018-11-13 19:34:06 -06:00
parent 054e8e1734
commit e2e725a3d5

View File

@@ -24,18 +24,27 @@ class FleetsController extends Controller
public function displayFleets() {
$fleets = DB::table('Fleets')->get();
$fleetIds = array();
$data = array();
$fc = array();
$fleet = array();
$description = array();
$i = 0;
foreach($fleets as $fleet) {
$fleetIds[$i] = [
'fc' => $fleet->character_id,
'fleet' => $fleet->fleet,
'description' => $fleet->description,
];
foreach($fleets as $fl) {
$fc[$i] = $fl->character_id;
$fleet[$i] = $fl->fleet;
$description[$i] = $fl->description;
$i++;
}
$data = [
$fc,
$fleet,
$description,
];
//Return the view with the array of the fleet
return view('fleets.displayfleets')->with('fleetIds', $fleetIds);
return view('fleets.displayfleets')->with($data);
}
public function registerFleet(Request $request) {