From dc829e383bb8d7f19e80be131e43fd0f8a218c38 Mon Sep 17 00:00:00 2001 From: Reck Date: Thu, 18 Nov 2021 09:56:06 +0300 Subject: [PATCH] contact delete --- app/Http/Controllers/ContactController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 861c141..5bd2737 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -49,6 +49,7 @@ public function update(Request $request, $id) public function destroy($id) { - + Contact::destroy($id); + return redirect('contact')->with('flash_message', 'Contact deleted!'); } } \ No newline at end of file