Explorar el Código

新增日志记录model

彭俊 hace 6 años
padre
commit
1d1785bb82
Se han modificado 1 ficheros con 33 adiciones y 0 borrados
  1. 33 0
      app/Http/Model/St_set_sports_record.php

+ 33 - 0
app/Http/Model/St_set_sports_record.php

@@ -0,0 +1,33 @@
+<?php
+namespace App\Http\Model;
+
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * Class St_country
+ * @package App\Sports\Model
+ * 国家 地区 关系
+ */
+class St_set_sports_record extends Model
+{
+
+    protected $table = 'st_set_sports_record';
+    public $timestamps = false;
+
+
+   //写 请求 数据 日志记录
+   public static function setSportsRecord($title,$obt){
+        $set = 0;
+        if(!empty($title) and !empty($obt)){
+           $setData = [
+            'title'=>$title,
+            'data'=>$obt,
+            'add_time'=>date('Y-m-d H:i:s'),
+           ];
+           $set = self::insertGetId($setData);
+        }
+
+        return $set;
+
+   }
+}