public function send() { $id = Input::get('id'); $tieudetraloi = Input::get('tieudetraloi'); $noidungtraloi = Input::get('noidungtraloi'); $trangthai = Input::get('xuly'); LienHe::UpdatePH($id, $tieudetraloi, $noidungtraloi, $trangthai); $data = array('hoten' => Input::get("hoten"), "noidung" => $noidungtraloi); Mail::send('admin.contacts.mail', $data, function ($message) { $message->to(Input::get("email"), Input::get("hoten"))->subject(Input::get('tieudetraloi')); }); return $this->show($id, "Đã gửi email phản hồi đến địa chỉ " . Input::get("email") . "!"); }
public function store() { if (Request::ajax()) { //Thêm vào csdl $hoten = Input::get("hoten"); $email = Input::get("email"); $tieude = Input::get("tieude"); $noidung = Input::get("noidung"); $lh = new LienHe(); $result = $lh->Insert($hoten, $email, $tieude, $noidung); //Lấy nội dung trang thông báo thành công $html = View::make("guest.contacts.complete", array("result" => $result))->render(); return Response::json(array('html' => $html)); } }