public function destroy(ContactRequest $request, Contact $contact)
    {
        try {

            $contact->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('contact::contact.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('contact/contact'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('contact/contact/' . $contact->getRouteKey()))
                ->redirect();
        }

    }
public function destroy(ContactRequest $request, Contact $contact)
    {
        try {

            $contact->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('contact::contact.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('contact/contact'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('contact/contact/' . $contact->getRouteKey()))
                ->redirect();
        }

    }
public function destroy ( ContactRequest $ request , Contact $ contact ) { try { $ contact -> delete ( ) ; return $ this -> response -> message ( trans ( 'messages.success.deleted' , [ 'Module' => trans ( 'contact::contact.name' ) ] ) ) -> code ( 202 ) -> status ( 'success' ) -> url ( guard_url ( 'contact/contact' ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'contact/contact/' . $ contact -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Remove the contact.

@param Model   $contact

@return Response
Remove the contact .