reportkit / laravel
Laravel 5.5–13 adapter for ReportKit (provider, Blade CAS pack, reportkit:make).
Requires
- php: >=7.0
- illuminate/support: >=5.5 <14
- reportkit/core: ^0.1@beta || ^0.1 || 0.1.* || dev-main
This package is auto-updated.
Last update: 2026-08-10 02:41:55 UTC
README
ReportKit for Laravel
Multi-database reports for Laravel 5.5 → 13 — install, scaffold, ship.
Website & Docs · Live Demo · Install guide · Laravel 4.1–5.4
Part of the Lorapok Labs ecosystem. The modern Laravel adapter for ReportKit Core — auto-discovered provider,
ReportKitfacade, CAS Blade views, and Artisan scaffolding.
What you get
- Auto-discovered service provider +
ReportKitfacade (extra.laravel). php artisan reportkit:install— one-command setup, optional--with-config --publish-assets.php artisan reportkit:make— full-stack report stubs (controller, views, tests, JS).- View namespace
reportkit::(publishable) and opt-inReportKit::routes(). - Never rewrites your existing reports.
php artisan reportkit:install --with-config --publish-assets php artisan reportkit:make Demo --route=admin/demo-report --preset=hybrid --layout=layouts.app
How a report flows
sequenceDiagram participant B as Browser participant R as Domain routes participant C as Report controller participant S as MergedRowSource participant K as reportkit core B->>R: GET demo report page R->>C: index C-->>B: Blade and UI assets B->>R: GET demo report data R->>C: data request C->>S: rows from each connection C->>K: paginate and respond K-->>B: DataTables JSONLoading
Architecture
flowchart LR
subgraph host [Laravel 5.5 plus host]
Prov[ServiceProvider]
Fac[ReportKit facade]
Defs[Report definitions]
Ctrl[Report controllers]
Views[Blade views]
end
Core[reportkit core]
UI[reportkit-ui assets]
Prov --> Core
Defs --> Core
Ctrl --> Core
Fac --> Prov
Views --> UI
Loading
Requirements
- PHP ≥ 7.0
illuminate/support>=5.5 <14reportkit/core(beta channel allowed)- Laravel 5.5 → current (12 / 13)
Install
composer require reportkit/core reportkit/laravel
Beta channel:
composer require "reportkit/laravel:^0.1@beta"
Install from Git (VCS) before/after Packagist
{
"repositories": [
{ "type": "vcs", "url": "https://github.com/Maijied/Reportkit-Core.git" },
{ "type": "vcs", "url": "https://github.com/Maijied/Reportkit-Laravel.git" }
],
"require": {
"reportkit/core": "dev-main",
"reportkit/laravel": "dev-main"
}
}
Provider and facade are auto-discovered on Laravel 5.5+. Then:
php artisan reportkit:install --with-config --publish-assets php artisan reportkit:make Demo --route=admin/demo-report --preset=hybrid --layout=layouts.app composer dump-autoload
Create app/Reports/ — the provider auto-requires *.php on boot. Register the printed routes ({{route}}/data for DataTables). Domain SQL stays in app/Repositories/Reports. Full checklist: docs/INSTALL.md.
Merge multiple databases
use ReportKit\Core\Source\MergedRowSource; use ReportKit\Laravel\Source\ConnectionRowSource; $domain = function ($query, array $filters) { return $query->from('orders') ->whereBetween('created_at', [$filters['start_date'], $filters['end_date']]); }; $live = new ConnectionRowSource('mysql', $domain, null, 'live'); $archive = new ConnectionRowSource('mysql_archive', $domain, null, 'archive'); $source = (new MergedRowSource([$live, $archive])) ->dedupeBy('id') // first source wins (live over archive) ->orderBy('created_at', 'desc'); $rows = $source->getRows($filters); // merged + deduped + sorted // $source->getTrace() → per-source row counts + timings for demos/debugging
Ecosystem
| Package | Role |
|---|---|
reportkit/core |
Engine (PHP 5.6 → 8.5) |
reportkit/laravel-legacy |
Laravel 4.1 – 5.4 |
reportkit/laravel |
This repository (5.5 → 12 / 13) |
@lorapok-labs/reportkit-ui |
Browser CSS/JS |
Author
Mohammad Maizied Hasan Majumder · mdshuvo40@gmail.com Founder & Principal Engineer at Lorapok Labs · Senior Software Engineer @ Shohoz Ltd
License
MIT © Mohammad Maizied Hasan Majumder / Lorapok Labs
