/**
  * Update the specified product in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $customerType = CustomerType::findOrFail($id);
     $validator = Validator::make(Input::all(), CustomerType::$rules);
     if ($validator->passes()) {
         $customerType->update(Input::all());
         return Response::json(array('success' => true, 'message' => array('type' => 'success', 'msg' => 'Thêm loại khách hàng thành công!')));
     } else {
         return Response::json(array('success' => false, 'errors' => $validator->errors()));
     }
 }