ads/statistics 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ads/statistics

Composer 安装命令:

composer require ads/statistics

包简介

Tracks basic user information to generate statistical data on page usage. Also provides additional information to debug 500 errors

README 文档

README

Audit/Error Logging Module for Laravel

The module will track the page view history for all users of the associated website. The module will log 500 error statistics to help with debugging code. Additionaly, the posted data for form submission will be saved in the database. The settings file has an array option that allows you to remove sensitive files from being saved in the tracking table.

Once configired, this plugin will automatically save page viewing history to the database.

(Make sure to run "php artisan migrate" if updating)

Step 1:

Set up composer, add the package to your require tag:

composer require ads/statistics

Step 2:

Publish and run migrations:

php artisan vendor:publish --provider=Ads\\Statistics\\StatisticsServiceProvider
php artisan migrate

Step 3:

Add Statistic logging to 'web' middleware in app\Http\Kernel.php:

    protected $middlewareGroups = [
        'web' => [
            ...
            \Ads\Statistics\Statistic::class,
        ],

Step 4:

In order to log 500 errors, you'll need to add some code to the app/Exceptions/Handler.php Add this interceptor to the register function Add to or create the report function before the return:

public function register()
{
	$this->reportable(function (Throwable $e) {
	    //
	});

	$this->reportable(function (\Exception $e) {
	    \Statistic::error($e);
	});
}

* Step 5 is only necessary if you have user authentication

Step 5:

Edit the config/statistics.php file.

Please enter the column names from your user database table.

For example:

  'user_id' => 'email',
  'first_name' => 'first_name',
  'last_name' => 'last_name',
  'protected_fields' => ['password'],

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2014-12-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固