public function delete($contactId) { $contact = $this->contactStore->getById($contactId); if (!empty($contact)) { $this->contactStore->delete($contact); } return $this->redirect('/contact')->success('Contact deleted.'); }
public function delete($contactId) { $contact = $this->contactStore->getById($contactId); if (!empty($contact)) { $this->contactStore->delete($contact); } $this->successMessage('Contact deleted.', true); $this->redirect('/contact'); }