rawphp/laravel-communication-logger

Laravel PHP应用程序的通信日志记录器。

dev-master 2016-07-24 07:06 UTC

This package is auto-updated.

Last update: 2024-09-20 08:50:35 UTC


README

Build Status

1. 安装

一如既往,我们需要通过Composer拉取一些依赖项。

composer require rawphp/laravel-communication-logger

2. 注册提供者

RawPHP\LaravelCommunicationLogger\CommunicationLoggerProvider::class,

3. 注册中间件

将CommunicationLog中间件添加到Kernel中间件数组中。这允许记录所有请求和响应。

/**
 * The application's route middleware groups.
 *
 * @var array
 */
protected $middlewareGroups = [
        CommunicationsLog::class,
    ],
];

3. 发布配置

php artisan vendor:publish --provider="RawPHP\LaravelCommunicationLogger\CommunicationLoggerProvider"