PHP code example of isapp / statamic-lead-insights

1. Go to this page and download the library: Download isapp/statamic-lead-insights 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/ */

    

isapp / statamic-lead-insights example snippets


'widgets' => [
    ['type' => 'leads_by_source', 'width' => 50],
    ['type' => 'leads_by_campaign', 'width' => 50],
    ['type' => 'leads_by_form', 'width' => 50],
    ['type' => 'form_source_breakdown', 'width' => 50, 'form' => 'contact'],
],

GET /cp/lead-insights/export?type=source&days=30
bash
php artisan lead-insights:prune
bash
php artisan lead-insights:prune --days=90