PHP code example of label305 / bugsnag-cakephp

1. Go to this page and download the library: Download label305/bugsnag-cakephp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

label305 / bugsnag-cakephp example snippets


Configure::write('BugsnagCakephp.apikey', '{yourbugsnagapikey}');

Configure::write('Exception', array(
    'handler' => 'BugsnagErrorHandler::handleException',
    'renderer' => 'ExceptionRenderer',
    'log' => true
));

Configure::write('Error', array(
    'handler' => 'BugsnagErrorHandler::handleError',
    'level' => E_ALL & ~E_DEPRECATED,
    'trace' => true
));

// place after the 'rorHandler', 'BugsnagCakephp.Lib');