12345678910111213141516171819202122232425262728293031 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/9/18
- * Time: 15:07
- */
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- class Oplog extends Model
- {
- public $timestamps = false;
- protected $table = "oplog";
-
- /**
- * 记录操作
- * @param type 1订单状态变更 0其他
- */
- public static function addLog($admin_id, $admin_name, $context = '', $type=0, $tables = null, $data_id = null){
- $params = array();
- $params['type'] = $type;
- $params['admin_id'] = $admin_id;
- $params['admin_name'] = $admin_name;
- $params['context'] = $context;
- $params['tables'] = $tables;
- $params['data_id'] = $data_id;
- return Oplog::insert($params);
- }
- }
|