function destroyContact() { $destroy = Contact::destroy(Input::get('id')); if ($destroy) { return '<p style="color: green">Mesaj silindi</p>'; } else { return '<p style="color: red">Mesaj silinmedi</p>'; } }
/** * 动作:批量删除联系记录 */ public function deleteContact(Request $request) { //删除 if ($request->has('deleteids')) { $ids = $request->input('deleteids'); //执行批量删除联系记录 Contact::destroy($ids); //更新联系次数和最后一次联系时间 $data = array('ret' => 0); exit(json_encode($data)); //$this->exitJson(Core_Modret::RET_SUCC,"删除记录成功"); } //$this->exitJson(Core_Modret::RET_SAVE_FAILED,"请选择需要删除的记录"); $data = array('ret' => 1, 'msg' => '请选择需要删除的记录'); exit(json_encode($data)); }
/** * Delete the given Contact. * * @param int $id * @return Redirect */ public function getDelete($id = null) { $contact = Contact::destroy($id); // Redirect to the group management page return redirect('admin/contacts')->with('success', Lang::get('message.success.delete')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Contact::destroy($id); return \Response::json(array('success' => true)); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // Contact::destroy($id); return redirect('contacts'); }
/** * @param $id * @return int */ protected function deleteContact($id) { return Contact::destroy($id); }
/** * Remove the specified resource from storage. * * @param int $id * * @return Response */ public function destroy($id) { Contact::destroy($id); Session::flash('flash_message', 'Contact deleted!'); return redirect('admin/contact'); }