This repository has been archived on 2020-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pingan/app/Facades/PingAn/Log.php
2020-08-06 16:37:53 +08:00

39 lines
802 B
PHP

<?php
namespace App\Facades\PingAn;
use App\Models\Log as LogModel;
class Log
{
/**
* 插入日志
* @param [type] $url [description]
* @param [type] $method [description]
* @param [type] $params [description]
* @param string $type [description]
* @return [type] [description]
*/
public static function insert($url, $method, $params, $type = 'pingan')
{
$data = [
'path' => $url,
'method' => $method,
'type' => $type,
'in_source' => $params,
];
$info = LogModel::create($data);
return $info;
}
//更新日志
public static function update($log, $params)
{
$log->out_source = $params;
$log->save();
}
}