12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace App\Servers;
- use App\Models\MemberLog;
- class MemberLogsServer
- {
- /**
- * 会员日志
- * @return $this|\Illuminate\Database\Eloquent\Model
- */
- static public function write()
- {
- if('common.base64'==request()->route()->getName()){
- return 1;
- }
- $m_id=empty(request()->member['m_id'])?:0;
- $url = request()->url();
- $token=request()->header('Authorization');
- if(empty($token)){
- $token = request()->input('token','');
- }
- $data=request()->all();
- $data['token']=$token;
- $ip=CommonServer::creatServer()->getClientIp();
- //广播弹幕-进入队列
- return MemberLog::create(
- [
- 'm_id' => $m_id,
- 'url' => $url,
- 'msg' => '',
- 'ip' => $ip,
- 'data' => http_build_query($data),
- ]
- );
- }
- }
|