PHP code example of webhubworks / craft-flare

1. Go to this page and download the library: Download webhubworks/craft-flare 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/ */

    

webhubworks / craft-flare example snippets


# config/app.php

'bootstrap' => [
    '\webhubworks\flare\Bootstrap', // <-- Add this line as the first entry
    // other bootstrap entries
],

CraftFlare::getFlareInstance()
   ->context('Order', [
         'price' => $order->price,
         'currency' => $order->currency,
    ])
   ->report(new \Exception('Test exception'));