OperationLogController.php 679 Bytes
<?php

namespace App\Http\Container\AdminSection\Controllers\System;

use App\Models\SystemOperateLog;
use App\Support\Controller;
use Hikoon\LaravelApi\Facades\Response;
use Illuminate\Http\Request;

class OperationLogController extends Controller
{
    /**
     * @param \Illuminate\Http\Request $request
     * @return \Hikoon\LaravelApi\Facades\Response
     */
    public function __invoke(Request $request): Response
    {
        $pageSize = $request->get('pageSize', 20);
        $filter   = $request->except('page', 'pageSize', 'fetchType');

        $data = SystemOperateLog::filter($filter)->paginate($pageSize);

        return $this->successWithData($data);
    }
}