mirror of
https://github.com/v2board/v2board.git
synced 2025-06-14 13:47:49 +08:00
update: server/getServerLog to stat/getTrafficLog
This commit is contained in:
@ -30,22 +30,4 @@ class ServerController extends Controller
|
||||
'data' => $servers
|
||||
]);
|
||||
}
|
||||
|
||||
public function getServerLogs(Request $request)
|
||||
{
|
||||
$serverLogModel = ServerLog::select([
|
||||
DB::raw('sum(u) as u'),
|
||||
DB::raw('sum(d) as d'),
|
||||
'log_at',
|
||||
'user_id',
|
||||
'rate'
|
||||
])
|
||||
->where('user_id', $request->session()->get('id'))
|
||||
->where('log_at', '>=', strtotime(date('Y-m-1')))
|
||||
->groupBy('log_at', 'user_id', 'rate')
|
||||
->orderBy('log_at', 'DESC');
|
||||
return response([
|
||||
'data' => $serverLogModel->get()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user