This commit is contained in:
2018-11-13 19:53:02 -06:00
parent e2e725a3d5
commit 20d7eef173
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -23,7 +23,8 @@ class FleetsController extends Controller
}
public function displayFleets() {
$fleets = DB::table('Fleets')->get();
//$fleets = DB::table('Fleets')->get();
$fleets = Fleet::all();
$data = array();
$fc = array();
$fleet = array();
@@ -44,7 +45,7 @@ class FleetsController extends Controller
];
//Return the view with the array of the fleet
return view('fleets.displayfleets')->with($data);
return view('fleets.displayfleets')->with('fleet', $fleet);
}
public function registerFleet(Request $request) {
@@ -3,8 +3,8 @@
<div class="container">
<h1>Work in Progress aka NOTHING WORKS!</h1><br>
<h2>Fleets</h2>
@foreach ($fleetIds as $fleet)
<a href="{{ route('addpilot', $fleet['fleet'], [Auth::user()->character_id]) }}">Join {{ $fleet['description'] }}</a>
@foreach ($fleet as $fl)
<a href="{{ route('addpilot', $fl->fleet, [Auth::user()->character_id]) }}">Join {{ $fleet->description }}</a>
@endforeach
</div>
@endsection