예제 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (count(ReclamoCausa::where('causa_id', $id)->get()) > 0) {
         return new AjaxResponse('error', 'Esta causa ya ha sido asignada a uno o más reclamos. Imposible eliminar');
     }
     $record = Causa::find($id)->delete();
     return new AjaxResponse('success', '');
 }
예제 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $record = ReclamoCausa::find($id)->delete();
     return new AjaxResponse('success', '');
 }