public function postRegister() { $data = \Input::get('data'); try { $recipient = \NewsLetter::register($data['email']); return \Response::json(['type' => 'success', 'message' => 'Registered to newsletter successfully.']); } catch (\Exception $e) { return \Response::json(['type' => 'danger', 'message' => $e->getMessage()]); } }