delete fleet

This commit is contained in:
2018-11-13 20:50:51 -06:00
parent da6281bbd4
commit 5f511808e5
3 changed files with 12 additions and 5 deletions

View File

@@ -85,13 +85,18 @@ class FleetsController extends Controller
$fleet->SetFleetEndTime($endTime);
//Return the view with the success message
return view('fleets.displayfleets')->with('success', 'Fleet registered.');
return view('/fleets/displayfleets')->with('success', 'Fleet registered.');
} else {
//Return the view with the error message of the fleet has been found already.
return view('fleets.displayfleets')->with('error', 'Fleet already in the database.');
return view('/fleets/displayfleets')->with('error', 'Fleet already in the database.');
}
}
public function deleteFleet($fleetId) {
DB::table('Fleets')->where('fleet', $fleetId)->delete();
return view('fleets.display')->with('success', 'Fleet deleted.');
}
public function addPilot($fleetId, $charId) {
//Retrieve the fleet data
$fleet = DB::table('Fleets')->where('fleet', $fleetId)->get();