PHP code example of reportkit / core

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

    

reportkit / core example snippets


use ReportKit\Laravel\Facades\ReportKit;

$source = ReportKit::merged([
    ReportKit::connection('mysql', fn ($q, $f) =>
        $q->from('trips')->whereBetween('booked_at', [$f['start_date'], $f['end_date']])),
    ReportKit::connection('mysql_archive', fn ($q, $f) =>
        $q->from('trips')->whereBetween('booked_at', [$f['start_date'], $f['end_date']])),
])->dedupeBy('trip_id')->orderBy('booked_at', 'desc');
bash
composer reportkit:install --publish-assets
php artisan reportkit:make Sales --route=admin/sales --preset=hybrid