laravel-legacy maintained by reportkit
Part of the Lorapok Labs ecosystem. Classic Laravel adapter for ReportKit Core. Same engine, same Artisan DX — tuned for pre-auto-discovery Laravel and PHP 5.6.
What you get
- Service provider +
ReportKitfacade (manual registration for L4.1–5.4). php artisan reportkit:install— checklist + optional--with-config --publish-assets.php artisan reportkit:make— full-stack stubs (definition, repository, service, controller, blade, JS, test).- CAS Blade partials under
reportkit::and opt-inReportKit::routes(). - Never modifies your existing reports.
Architecture
flowchart LR
subgraph host [Laravel 4.1 to 5.4 host]
Prov[ServiceProvider]
Fac[ReportKit facade]
Defs[Report definitions]
Ctrl[ReportController]
Views[Blade views]
end
Core[reportkit core]
UI[reportkit-ui assets]
Prov --> Core
Defs --> Core
Ctrl --> Core
Fac --> Prov
Views --> UI
DataTables request flow
sequenceDiagram
participant B as Browser
participant R as Domain routes
participant C as ReportController
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 JSON
Requirements
- PHP 5.6 – 7.4
reportkit/core(beta channel allowed)- Laravel 4.1 – 5.4 host
@lorapok-labs/reportkit-uiassets copied into public
Install
composer require reportkit/laravel-legacy
{
"repositories": [
{ "type": "vcs", "url": "https://github.com/Maijied/Reportkit-Core.git" },
{ "type": "vcs", "url": "https://github.com/Maijied/Reportkit-Laravel-Legacy.git" }
],
"require": {
"reportkit/core": "dev-main",
"reportkit/laravel-legacy": "dev-main"
}
}
Register in app/config/app.php (Laravel 4.1 style):
'providers' => array(
'ReportKit\\Laravel\\Legacy\\ReportKitServiceProvider',
),
'aliases' => array(
'ReportKit' => 'ReportKit\\Laravel\\Legacy\\Facades\\ReportKit',
),
Then:
php artisan reportkit:install --with-config --publish-assets
php artisan reportkit:make Demo --route=admin/demo-report --preset=hybrid --layout=layouts.master
composer dump-autoload
composer dump-autoload is required for the L4.1 classmap. Full checklist: docs/INSTALL.md.
Merge multiple databases
use ReportKit\Core\Source\MergedRowSource;
use ReportKit\Laravel\Legacy\Source\ConnectionRowSource;
$domain = function ($query, array $filters) {
return $query->from('orders')
->whereBetween('created_at', array($filters['start_date'], $filters['end_date']));
};
$live = new ConnectionRowSource('mysql', $domain, null, 'live');
$archive = new ConnectionRowSource('mysql_archive', $domain, null, 'archive');
$source = new MergedRowSource(array($live, $archive));
$source->dedupeBy('id')->orderBy('created_at', 'desc');
$rows = $source->getRows($filters); // merged + deduped + sorted
Ecosystem
| Package | Repo |
|---|---|
reportkit/core |
Reportkit-Core |
reportkit/laravel-legacy |
This repository |
reportkit/laravel |
Reportkit-Laravel (5.5 → 13) |
@lorapok-labs/reportkit-ui |
Reportkit-UI |
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