Skip to content

Commit

Permalink
feat: Added destroy method function body
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhuss committed Apr 6, 2021
1 parent c2ef7cc commit 2a7c060
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Controllers/CategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public function update(Request $request, $id)
*/
public function destroy($id)
{
//
$category = Category::find($id);
$category->delete();
return redirect()->route('categories.index');
}
}

0 comments on commit 2a7c060

Please sign in to comment.