bartoszf/simple-analytics
Composer 安装命令:
composer require bartoszf/simple-analytics
包简介
Laravel package for implementing simple analytics
README 文档
README
Laravel package for implementing simple analytics
Table of Contents
Requirements
- This package requires PHP 5.6+
- As for now, you need Auth facade with user.
Getting Started
- Require the package in your
composer.jsonand update your dependency withcomposer update:
"require": {
...
"bartoszf/simple-analytics": "~0.8",
...
},
- Add the package to your application service providers in
config/app.php.
'providers' => [ Illuminate\Foundation\Providers\ArtisanServiceProvider::class, Illuminate\Auth\AuthServiceProvider::class, ... BartoszF\SimpleAnalytics\AnalyticsServiceProvider::class, ],
- Publish the package migrations to your application and run these with
php artisan migrate.
$ php artisan vendor:publish --provider="BartoszF\SimpleAnalytics\AnalyticsServiceProvider"
- Add the middleware to your
app/Http/Kernel.php.
protected $routeMiddleware = [ .... 'analytics' => BartoszF\SimpleAnalytics\Middleware\ReportUserRouteMiddleware::class, ];
-
Adjust view as you wish (probably extend it with your app layout)
-
Add
analyticsmiddleware to your routes from wich you want to get details.
Contribution Guidelines
Support follows PSR-2 PHP coding standards, and semantic versioning.
Please report any issue you find in the issues page. Pull requests are welcome.
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-03