Example #1
0
 public function doAddPointMmpoint(Request $request)
 {
     $key = request('key');
     // $h_id=request('H');
     $type = request('type');
     $datas = null;
     if ($type == '0' || $type == '-1' || $type == '1') {
         $datas = MmcalculationModel::on(DBUtils::getDBName())->find($key);
     } else {
         $datas = MmpointModel::on(DBUtils::getDBName())->find($key);
     }
     //  $lists =$datas->get();
     //$lists = $datas->orderBy('B','ASC')->take(9)->union($old_mmpoint)->get();
     return response()->json(['formula' => json_encode($datas)]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function deleteSelect(Request $request)
 {
     Log::info("deleteSelect ");
     $checkboxs_hidden = Input::get('checkboxs_hidden');
     $checkboxs_explode = explode("_", $checkboxs_hidden);
     for ($i = 0; $i < sizeof($checkboxs_explode); $i++) {
         if (!empty($checkboxs_explode[$i])) {
             Log::info(" [" . $i . "]" . $checkboxs_explode[$i]);
             MmcalculationModel::on(DBUtils::getDBName())->find($checkboxs_explode[$i])->delete();
         }
     }
     return redirect('ais/designCalculation');
 }