承接 samfelgar/log-requests 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

samfelgar/log-requests

最新稳定版本:v2.1

Composer 安装命令:

composer require samfelgar/log-requests

包简介

README 文档

README

This package provides a simple request logger to be used with Laravel applications.

Installation

You can install this package via composer:

composer require samfelgar/log-requests

By default, the logging channel used is the stack, but you can change this by publishing the config file:

php artisan vendor:publish --provider=Samfelgar\\LogRequests\\Providers\\LogRequestServiceProvider

After running the command above, the file log-requests.php will be created in the config path.

Usage

This package registers a middleware alias that can be used in your routes files:

use Illuminate\Support\Facades\Route;

Route::middleware(['log-requests'])->group(function () {
    // Your logged routes goes here.
});

You may also register the middleware within a group or globally by editing the \App\Http\Kernel class:

  • In groups
protected $middlewareGroups = [
    'web' => [
        // Other middleware
        \Samfelgar\LogRequests\Http\Middleware\LogRequest::class,
    ],

    'api' => [
        'throttle:api',
        'bindings',
        \Samfelgar\LogRequests\Http\Middleware\LogRequest::class,
    ],
];
  • Globally
protected $middleware = [
    // Other middleware
    \Samfelgar\LogRequests\Http\Middleware\LogRequest::class,
];

For more information about middlewares in Laravel, check the documentation.

Contributing

Found an error? Open an issue!

Any contribution is appreciated, just submit a pull request.

统计信息

  • 总下载量: 3.96k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固