CakePHP plugin integration for Rollbar error tracking tool.
- CakePHP 3.5 or greater
- PHP 5.6 or greater
- And Rollbar account
-
You can install this plugin into your CakePHP application using composer
composer require cakephp-biztech/cake-rollbar
-
After installation, load the plugin
// src/Application.php Plugin::load('CakeRollbar');
Or, you can load the plugin using the shell command:
bin/cake plugin load CakeRollbar
Create a new Rollbar project and get post_server_item
access token by going to your project's settings. And set below config array into your config/app.php
file.
// config/app.php
return [
'Rollbar' => [
'access_token' => env('ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN', null),
'environment' => env('APP_ENV'),
]
];
All set! 🎉
This plugin will capture and send all the notices, errors, exceptions, etc. to Rollbar for you to solve them.