add pilot

This commit is contained in:
2018-11-13 22:02:19 -06:00
parent dfbfa450a3
commit 622be54fad

View File

@@ -95,10 +95,12 @@ class FleetsController extends Controller
}
public function addPilot($fleetId, $charId) {
$newPilot = new Fleet();
//Retrieve the fleet data
$fleet = DB::table('Fleets')->where('fleet', $fleetId)->get();
//Add a pilot to the fleet
$error = $fleet->AddPilot($fleet[0]->character_id, $charId);
$error = $newPilot->AddPilot($fleet[0]->character_id, $charId);
return redirect('/fleets/display');
}