正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -110,7 +110,6 @@ class Base extends Model | @@ -110,7 +110,6 @@ class Base extends Model | ||
| 110 | */ | 110 | */ |
| 111 | public function addReturnId($data){ | 111 | public function addReturnId($data){ |
| 112 | $data = $this->filterRequestData($data,$this->table); | 112 | $data = $this->filterRequestData($data,$this->table); |
| 113 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND); | ||
| 114 | $data['created_at'] = date('Y-m-d H:i:s'); | 113 | $data['created_at'] = date('Y-m-d H:i:s'); |
| 115 | $data['updated_at'] = $data['created_at']; | 114 | $data['updated_at'] = $data['created_at']; |
| 116 | return $this->insertGetId($data); | 115 | return $this->insertGetId($data); |
| @@ -267,6 +266,7 @@ class Base extends Model | @@ -267,6 +266,7 @@ class Base extends Model | ||
| 267 | { | 266 | { |
| 268 | // 获取表的字段列表 | 267 | // 获取表的字段列表 |
| 269 | $columns = Schema::getColumnListing($table); | 268 | $columns = Schema::getColumnListing($table); |
| 269 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($columns, true) . PHP_EOL, FILE_APPEND); | ||
| 270 | // 过滤数据 | 270 | // 过滤数据 |
| 271 | return array_filter($data, function ($key) use ($columns) { | 271 | return array_filter($data, function ($key) use ($columns) { |
| 272 | return in_array($key, $columns); | 272 | return in_array($key, $columns); |
-
请 注册 或 登录 后发表评论