定制 limanweb/eloquent-logger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

limanweb/eloquent-logger

最新稳定版本:v1.0.5

Composer 安装命令:

composer require limanweb/eloquent-logger

包简介

Extensions for Laravel Eloquent\Model logging

README 文档

README

Installation

  1. Run command to install a package into you project

    composer require limanweb/eloquent-logger

  2. Add package provider into providers section of your config/app.php

    'providers' => [ ... \Limanweb\EloquentLogger\ServiceProvider::class, ],

  3. Run command to publish package's config and migration

    php artisan vendor:publish

and choise package \Limanweb\EloquentLogger\ServiceProvider to publish.

Now you have configuration file config/limanweb/eloquent_logger.php.

  1. If you have changed user ID type to UUID in your project, then you must configure it in user section of configuration.

    'user' => [ ... 'key_cast' => 'string', 'key_create_method' => 'uuid', ],

  2. Run migrate command.

    php artisan migrate

  3. In App\Providers\EventServiceProvider add next line to bottom of boot()

    \Limanweb\EloquentLogger\LoggerService::initLogger();

Configuration

To turn on logger fore any model, add it into models section of configutarion.

'models' => [
	...
	App\AnyModel::class => [],
],	 

To exclude any model specified fields, add if into models.AnyModel.exclude_fields array of model declaration.

'models' => [
	...
	App\AnyModel::class => [
		'exclude_fields' => [
			'search',
		],
	],
],	 

To globally exclude any fields, add if into exclude_fields array of configutarion.

'exclude_fields' => [
	'created_at',
	'updated_at',
],

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-05