marksihor/laravel-reports

Laravel reports based on eloquent queries.

1.05 2023-10-27 08:57 UTC

This package is auto-updated.

Last update: 2024-10-27 11:14:02 UTC


README

Laravel reports based on eloquent queries.

Installing

composer require marksihor/laravel-reports -vvv

Examples

$report = (new Report($query))
            ->filterable()
            ->setSumColumn('total')
            ->setGroupColumn('status')
            ->withQuantity()
            ->make();

$report = (new Report($query))->filterable()->today()->count();
$report = (new Report($query))->filterable()->tomorrow()->count();
$report = (new Report($query))->filterable()->yesterday()->count();
$report = (new Report($query))->filterable()->thisWeek()->count();
$report = (new Report($query))->filterable()->thisMonth()->count();
$report = (new Report($query))->filterable()->thisYear()->count();
$report = (new Report($query))->filterable()->future()->count();

License

MIT