Skip to content

Commit

Permalink
trainers functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mwakai committed Sep 12, 2023
1 parent 9cbee39 commit 76241bc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/Http/Controllers/TrainersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Http\Controllers;

use App\Models\Trainer;
use Illuminate\Http\Request;

class TrainersController extends Controller
Expand All @@ -11,4 +12,20 @@ class TrainersController extends Controller
public function index() {
return view('admin.trainers');
}

public function addTrainer() {

}

public function updateTrainer() {

}

public function deleteTrainer(Request $request) {
$id = $request->id;
Trainer::where('id', $id)->delete();

return redirect()->back()->with('success', 'Trainer deleted successfully');

}
}

0 comments on commit 76241bc

Please sign in to comment.