PHP code example of gopaljha / laravel-datadog

1. Go to this page and download the library: Download gopaljha/laravel-datadog 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/ */

    

gopaljha / laravel-datadog example snippets


$providers = [
    GopalJha\LaravelDataDog\LaravelDataDogServiceProvider::class,
]

php artisan vendor:publish --provider="GopalJha\LaravelDataDog\LaravelDataDogServiceProvider" --tag=config

\DataDog::increment('app.pageview');

\DataDog::increment('app.pageview', ['tag' => 'one', 'tag' => 'two']);

\DataDog::increment('app.pageview', ['tag' => 'one', 'tag' => 'two'], 'example.com');