PHP code example of trustportidentity / beacon-laravel
1. Go to this page and download the library: Download trustportidentity/beacon-laravel 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/ */
trustportidentity / beacon-laravel example snippets
// app/Http/Kernel.php
use TrustPortIdentity\Beacon\BeaconMiddleware;
protected $middleware = [
BeaconMiddleware::class,
];
use TrustPortIdentity\Beacon\Beacon;
$span = Beacon::span('db.mysql.select_invoices', 'database');
$invoices = Invoice::where('status', 'pending')->get();
$span->setTag('rows', $invoices->count())->end();