public function postEliminar() { $acidez = Acidez::find(Input::get('id')); $lote = Lote::where('acidez_id', '=', Input::get('id')); if ($lote->count()) { $lote = $lote->first(); $lote->acidez_id = 0; $lote->save(); } $acidez->delete(); }