Track your API metrics within ReadMe.
composer require readme/metrics
readme/metrics is currently targeted towards codebases utilizing the Laravel framework. To get up and running, you'll need to do the following things:
- Publish our config file into your
config/directory:
php artisan vendor:publish --provider="ReadMe\ServiceProvider"
- In
config/readme.php, changeapi_keyto the API key we provide to you in your ReadMe project on https://dash.readme.io. - In that config file, you will also see a
group_handlerthat will be set toApp\Handler\ReadMe::class. This file will exist withinapp\Handlerin your application and you should change the contents of itsconstructGroupfunction to return data that's relevant to your codebase and users. We've provided some simple defaults but you'll likely need to change them.
Once you've done all that, add \ReadMe\Middleware::class into your API middleware in app/Http/Kernel.php and API Metrics will start streaming to your ReadMe project!
