diegorivas89/laravel-stathat
Composer 安装命令:
composer require diegorivas89/laravel-stathat
包简介
Laravel 4.2 integration for the Stathat API
README 文档
README
Laravel 4 integration for the Stathat API
Requeriments
php >= 5.4illuminate/support: 4.2.*
Installation
Begin by installing this package through Composer. Edit your project's composer.json file to require diegorivas89/stathat-laravel.
"require": {
"diegorivas89/stathat-laravel": "dev-master"
}
Next, update Composer from the Terminal:
composer update
Once this operation completes, add the service provider. Open app/config/app.php, and add a new item to the providers array.
'Stathat\StathatServiceProvider'
Also you can add the facade accesor to the end of aliases key in app/config/app.php
'Stathat' => 'Stathat\Facades\StathatEz'
or if you want to use the classic api
'Stathat' => 'Stathat\Facades\StathatClassic'
The final step is publish the config file. For this, run
php artisan config:publish
Configuration
In the published file you must set your credentials, this is the user_key and the email depending on the type of api you will use.
Usage
Stathat::count('page_views'); // default value is 1
Stathat::count('page_views', 2);
Stathat::value('revenue', 17);
or if you have to have to use more than one account of stathat, you could do:
Stathat::count('page_views', 1); // default account from config
Stathat::count('page_views', 1, 'first.account@email.com');
Stathat::count('page_views', 1, 'second.account@email.com');
diegorivas89/laravel-stathat 适用场景与选型建议
diegorivas89/laravel-stathat 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 04 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「stats」 「laravel」 「api bindings」 「stathat」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 diegorivas89/laravel-stathat 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 diegorivas89/laravel-stathat 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 diegorivas89/laravel-stathat 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Helper to handle stats table with multiple formatter
Rserve client library for PHP
A PSR-7 compatible library for making CRUD API endpoints
The Playground Stats module
X-Ray provides a comprehensive overview of the content present on your site and individual pages, allowing you to inspect and evaluate them at a glance.
Stats for PuMuKIT and Paella
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-16