Fixed deletion

This commit is contained in:
frederikpyt 2020-06-30 11:45:54 +02:00
parent 484641bdee
commit e0142bf977
1 changed files with 3 additions and 2 deletions

View File

@ -113,9 +113,10 @@ class ContactController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Exception
*/
public function destroy(Contact $id)
public function destroy($id)
{
$id->delete();
$contact = Contact::find($id);
$contact->delete();
return redirect()->route("contacts.index");
}
}