Jimy 6 tahun lalu
induk
melakukan
c5130e5af5
1 mengubah file dengan 19 tambahan dan 0 penghapusan
  1. 19 0
      app/Http/Controllers/Admin/SportsfootController.php

+ 19 - 0
app/Http/Controllers/Admin/SportsfootController.php

@@ -50,7 +50,26 @@ class SportsfootController extends Controller {
 		return view('admin.sportsfoot/outcome', $dt->render($request));
 	}
 
+	//结果添加
+	function addend(Req $req){
+		$match_id = $req->input('match_id');
+		$model = \App\Models\Stzqresult::where('match_id', $match_id)->first();
+		$model->first_score = $req->firstscore;
+		$model->last_score = $req->lastscore;
+		$model->match_winer = $req->matchwiner;
+		$model->u_home_score = $req->uhomescore;
+		$model->u_guest_score = $req->uguestscore;           
+	   
+        $model->save();
+        return responseToJson(1);
+	}
 
+	//查询赛事结果
+	function Matchresult(Req $req){
+		$match_id = $req->match_id;
+		$newapp = \App\Models\Stzqresult::where('match_id', $match_id)->first();
+		return $newapp;
+	}
 
 	//结算
 	function Settlement(Req $req){