Skip to content

Commit

Permalink
Merge pull request BadChoice#821 from deshraj22/dev
Browse files Browse the repository at this point in the history
 Fix BadChoice#260 Added Delete Team Buttom (Desh Commit)
  • Loading branch information
BadChoice authored Oct 2, 2024
2 parents 8f099c8 + 832a582 commit 479f359
Show file tree
Hide file tree
Showing 4 changed files with 923 additions and 910 deletions.
9 changes: 9 additions & 0 deletions app/Http/Controllers/TeamsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function edit(Team $team)
return view('teams.edit', ['team' => $team]);
}


public function update(Team $team)
{
$team->update([
Expand All @@ -48,4 +49,12 @@ public function update(Team $team)

return redirect()->route('teams.index');
}

public function destroy(Team $team)
{

$Thisteam=Team::where('id',$team['id']);
$Thisteam->delete();
return redirect()->route('teams.index');
}
}
Loading

0 comments on commit 479f359

Please sign in to comment.