26 lines
674 B
PHP
Raw Normal View History

2019-12-12 22:33:12 +08:00
<?php
namespace catchAdmin\system\controller;
use catcher\base\CatchController;
use catcher\CatchResponse;
use think\facade\Db;
class OperateLog extends CatchController
{
public function list()
{
return CatchResponse::paginate(
Db::name('operate_log')
->field(['operate_log.*', 'users.username as creator'])
->join('users','users.id = operate_log.creator_id')
->order('id', 'desc')
2020-04-17 15:02:50 +08:00
->paginate(request()->param('limit') ?? 10)
2019-12-12 22:33:12 +08:00
);
}
2019-12-15 15:50:10 +08:00
public function empty()
{
return CatchResponse::success(Db::name('operate_log')->delete(true), '清空成功');
}
2019-12-12 22:33:12 +08:00
}