diff --git a/app/Http/Controllers/FleetsController.php b/app/Http/Controllers/FleetsController.php index d71d28173..21e48ab78 100644 --- a/app/Http/Controllers/FleetsController.php +++ b/app/Http/Controllers/FleetsController.php @@ -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(); diff --git a/resources/views/fleets/displayfleets.blade.php b/resources/views/fleets/displayfleets.blade.php index 8bdd75296..b429bc937 100644 --- a/resources/views/fleets/displayfleets.blade.php +++ b/resources/views/fleets/displayfleets.blade.php @@ -1,11 +1,12 @@ @extends('layouts.b4') @section('content')