fleets
This commit is contained in:
@@ -24,18 +24,27 @@ class FleetsController extends Controller
|
|||||||
|
|
||||||
public function displayFleets() {
|
public function displayFleets() {
|
||||||
$fleets = DB::table('Fleets')->get();
|
$fleets = DB::table('Fleets')->get();
|
||||||
$fleetIds = array();
|
$data = array();
|
||||||
|
$fc = array();
|
||||||
|
$fleet = array();
|
||||||
|
$description = array();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($fleets as $fleet) {
|
|
||||||
$fleetIds[$i] = [
|
foreach($fleets as $fl) {
|
||||||
'fc' => $fleet->character_id,
|
$fc[$i] = $fl->character_id;
|
||||||
'fleet' => $fleet->fleet,
|
$fleet[$i] = $fl->fleet;
|
||||||
'description' => $fleet->description,
|
$description[$i] = $fl->description;
|
||||||
];
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
$fc,
|
||||||
|
$fleet,
|
||||||
|
$description,
|
||||||
|
];
|
||||||
|
|
||||||
//Return the view with the array of the fleet
|
//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) {
|
public function registerFleet(Request $request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user