public function destroy(Contactable $contactable) { if (is_integer($contactable)) { $contactable = Contactable::find($contactable); } $contactable->delete(); Flash::success('Contactable has been created Deleted!'); return Redirect::back(); }
public function destroy($contactable) { $contactable = Contactable::find($contactable); $contactable->delete(); return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']); }