定制 ash-powell/apanalytics 二次开发

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

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

ash-powell/apanalytics

Composer 安装命令:

composer require ash-powell/apanalytics

包简介

A MongoDB Analytics Tracking and Parsing Package

关键字:

README 文档

README

Build Status styleci Scrutinizer Code Quality

Packagist Packagist Packagist

Simple Logging and Viewing for Analytics using MongoDB - Very rough first draft

Installation

Install via composer

composer require ash-powell/apanalytics

Register Service Provider

Note! This and next step are optional if you use laravel>=5.5 with package auto discovery feature.

Add service provider to config/app.php in providers section

AshPowell\APAnalytics\APAnalyticsServiceProvider::class,

Register Facade

Register package facade in config/app.php in aliases section

AshPowell\APAnalytics\Facades\APAnalytics::class,

Publish Configuration File

php artisan vendor:publish --provider="AshPowell\APAnalytics\APAnalyticsServiceProvider" --tag="config"

Publish VueJS Analytic Chart Thing... Requires Vue-ApexCharts

php artisan vendor:publish --provider="AshPowell\APAnalytics\APAnalyticsServiceProvider" --tag="views"

Usage

Extend Analytic Models our Model instead of Elequent

This will make sure the correct db connection and table are used

use AshPowell\APAnalytics\AnalyticModel as Model;

class ViewAnalytic extends Model;

To Log events simply use the built in helper as follows:

trackEvent('table', $items, $userId = null, $params = []),
  • Table will get plauralised
  • Items can be models, collections, or custom (see config for model formatting)
  • UserId is who performed the action, nullable, default is logged user
  • Params is an array of extra config, nullable also

Security

If you discover any security related issues, please email ash-powell@hotmail.co.uk instead of using the issue tracker.

Credits

This package relies heavily on jenssegers/laravel-mongodb.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-14