Skip to content

Commit 2a7c060

Browse files
author
ahmadhuss
committed
feat: Added destroy method function body
1 parent c2ef7cc commit 2a7c060

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Http/Controllers/CategoryController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ public function update(Request $request, $id)
8989
*/
9090
public function destroy($id)
9191
{
92-
//
92+
$category = Category::find($id);
93+
$category->delete();
94+
return redirect()->route('categories.index');
9395
}
9496
}

0 commit comments

Comments
 (0)