예제 #1
0
 /**
  * destroy Contact.
  *
  * @param Business $business Business holding the Contact
  * @param Contact  $contact  Contact to destroy
  *
  * @return Response Redirect back to Business show
  */
 public function destroy(Business $business, Contact $contact)
 {
     logger()->info(__METHOD__);
     logger()->info(sprintf('businessId:%s contactId:%s', $business->id, $contact->id));
     $this->authorize('manage', $contact);
     // BEGIN
     $this->contactService->detach($business, $contact);
     flash()->success(trans('user.contacts.msg.destroy.success'));
     return redirect()->route('user.business.contact.index', $business);
 }
예제 #2
0
 /**
  * destroy Contact.
  *
  * @param Business $business Business holding the Contact
  * @param Contact  $contact  Contact to destroy
  *
  * @return Response Redirect back to Business dashboard
  */
 public function destroy(Business $business, Contact $contact)
 {
     logger()->info(__METHOD__);
     logger()->info(sprintf('businessId:%s contactId:%s', $business->id, $contact->id));
     $this->authorize('manageContacts', $business);
     // BEGIN //
     $contact = $this->contactService->detach($business, $contact);
     // FEATURE: If user is linked to contact, inform removal
     flash()->success(trans('manager.contacts.msg.destroy.success'));
     return redirect()->route('manager.addressbook.index', $business);
 }