PHP code example of zephir / luya-module-errorapi

1. Go to this page and download the library: Download zephir/luya-module-errorapi 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/ */

    

zephir / luya-module-errorapi example snippets


'modules' => [
    // ...
    'errorapi' => [
        'class' => 'luya\errorapi\Module',
        'adapters' => [
            [
                'class' => 'luya\errorapi\adapters\MailAdapter',
                'recipient' => ['[email protected]'],
            ],
            [
                'class' => 'luya\errorapi\adapters\SlackAdapter',
                'token' => 'xyz.xyz.xyz.xyz',
            ],
            [
                'class' => 'luya\errorapi\adapters\SentryAdapter',
                'token' => 'YOUR_SENTRY_USER_AUTH_TOKEN',
                'organisation' => 'organisationslug',
                'team' => 'teamslug',
            ]
        ],
    ],
]

'components' => [
    // ...
    'errorHandler' => [
        'api' => 'https://example.com/errorapi', // where example is the domain you have setup error api above
        'transferException' => true,
    ],
]