aschmelyun/quickmetrics-laravel
Composer 安装命令:
composer require aschmelyun/quickmetrics-laravel
包简介
Laravel wrapper package for the Quickmetrics.io API
README 文档
README
This is a basic wrapper package for sending events to the Quickmetrics API. It exposes a single class function, qm(), that you can use across your Laravel controllers, models, and views.
Installation
Run composer require aschmelyun/quickmetrics-laravel from your Laravel application root. Once that's finished, you'll need to open up your .env file and add the following to the bottom:
QUICKMETRICS_API_KEY={your-api-key}
Optionally: You can publish the config file from the package by running:
php artisan vendor:publish --provider="Larahawk\Watcher\LarahawkServiceProvider"
Usage
To send a single event in your application, use qm()->event(name, value, dimension). Name is a required string, value a required float, and dimension is an optional string that defaults to null.
You can also send batch events with qm()->batch(items). See the documentation on batching for more details about how your items array should be formatted.
More Info
This package was developed as part of a video tutorial I've published on YouTube for getting started with Laravel package development. Check it out here if you want a behind-the-scenes look at how this was built.
If you have any questions, feel free to reach out to me on Twitter @aschmelyun.
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-17