Download the PHP package ibekzod/visual-report-builder without Composer
On this page you can find all versions of the php package ibekzod/visual-report-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ibekzod/visual-report-builder
More information about ibekzod/visual-report-builder
Files in ibekzod/visual-report-builder
Package visual-report-builder
Short Description Visual Report Builder for Laravel - Build multi-dimensional pivot tables and reports without code. Like Kyubit.com
License MIT
Homepage https://github.com/ibekzod/visual-report-builder
Informations about the package visual-report-builder
Visual Report Builder
A complete, production-ready Laravel package for creating pivot tables, visual reports, and analytics dashboards with drag-and-drop template creation and template-based execution.
Features
- Drag-and-Drop Template Builder - Create reports visually without writing code
- Template-Based Execution - Execute pre-defined templates with dynamic filters
- Multi-Dimensional Pivot Tables - Group data by unlimited dimensions and metrics
- Universal Data Source Support - Works with any Eloquent model automatically
- 6 Aggregate Functions - SUM, AVG, MIN, MAX, COUNT, COUNT_DISTINCT
- Multiple Export Formats - CSV, Excel, PDF, JSON
- REST API - Complete API for programmatic access
- Zero Configuration - Works out of the box with Laravel auto-discovery
- Database Agnostic - PostgreSQL, MySQL, MariaDB, SQLite, SQL Server
- Modern UI - Clean, minimalistic Laravel-style design
Requirements
- PHP 8.1 or higher
- Laravel 10.x or 11.x
- Any supported database (PostgreSQL, MySQL, SQLite, SQL Server)
Installation
Step 1: Install via Composer
Step 2: Run Migrations
Step 3: Access the Dashboard
Navigate to your application:
The package auto-discovers your Eloquent models and is ready to use immediately.
Quick Start Guide
Creating Your First Report Template
- Go to
http://yourapp.test/visual-reports - Click the "Create Template" button in the header
- Select a data source (model) from the dropdown
- Drag dimension fields to the Row Dimensions or Column Dimensions zones
- Drag metric fields to the Metrics zone
- Click "Preview" to see the data
- Click "Save Template" and fill in the template details
- Your template now appears in the dashboard for all users
Executing Reports
- Go to
http://yourapp.test/visual-reports(Dashboard) - Select a template from the left sidebar
- Apply any filters in the filter panel
- Click "Run Report" to execute
- View results as table or chart
- Export to CSV, Excel, PDF, or JSON
- Save the report to your personal library
Architecture Overview
Two Complementary Workflows
Template Creation (Builder)
Template Execution (Dashboard)
Core Components
Services
| Service | Purpose |
|---|---|
DataSourceManager |
Auto-discovers models, columns, and relationships using PHP Reflection |
QueryBuilder |
Generates dynamic SQL with GROUP BY, aggregates, HAVING, and JOINs |
TemplateExecutor |
Executes templates with user-selected filter values |
PivotEngine |
Creates pivot table structures from flat query results |
AggregateCalculator |
Computes sum, avg, min, max, count, count_distinct |
FilterManager |
Applies dynamic filter conditions to queries |
ExporterFactory |
Creates appropriate exporter for each format |
Models
| Model | Purpose |
|---|---|
ReportTemplate |
Template definition (model, dimensions, metrics, filters, category) |
TemplateFilter |
Filter configurations with operators and default values |
ReportResult |
Saved report executions with user-applied filters |
Controllers
| Controller | Purpose |
|---|---|
BuilderController |
Model discovery, relationships, template creation |
TemplateController |
Template CRUD, execution, filtering, export |
DashboardController |
Dashboard statistics and overview |
Usage
Web Interface
The package provides two main views:
Dashboard (/visual-reports)
- Template selection sidebar organized by category
- Statistics cards showing templates, saved reports, favorites
- Report display area with table and chart views
- Filter panel for applying dynamic filters
- Export and save functionality
Builder (/visual-reports/builder)
- Two-panel layout: Configuration (left) + Available Fields (right)
- Color-coded draggable fields:
- Blue border = Dimensions (text, date, boolean columns)
- Green border = Metrics (numeric columns)
- Drop zones for Row Dimensions, Column Dimensions, and Metrics
- Live JSON preview before saving
- Modal for template metadata (name, category, description, icon)
PHP Code Usage
REST API
Template Endpoints
Builder Endpoints
Report Result Endpoints
Configuration
Publishing Configuration
Configuration Options
Edit config/visual-report-builder.php:
Environment Variables
Database Support
The package supports multiple database systems with automatic identifier quoting:
| Database | Quote Character | Status |
|---|---|---|
| PostgreSQL | " (double quotes) |
Fully supported |
| MySQL | ` (backticks) |
Fully supported |
| MariaDB | ` (backticks) |
Fully supported |
| SQLite | " (double quotes) |
Fully supported |
| SQL Server | " (double quotes) |
Fully supported |
The package automatically detects the database driver and uses the appropriate quoting.
Aggregate Functions
| Function | Description | SQL Generated |
|---|---|---|
sum |
Total of all values | SUM(column) |
avg |
Average value | AVG(column) |
min |
Minimum value | MIN(column) |
max |
Maximum value | MAX(column) |
count |
Count of rows | COUNT(column) |
count_distinct |
Count of unique values | COUNT(DISTINCT column) |
value |
Raw value (no aggregation) | column |
Custom Model Configuration
Default Behavior (Auto-Discovery)
The package automatically discovers all Eloquent models and their columns:
Custom Dimensions and Metrics (Optional)
For fine-grained control over what appears in the builder:
Relationship Joins
The package automatically detects Eloquent relationships and allows joining related tables:
Supported relationship types:
belongsTohasOnehasManybelongsToMany
Real-World Examples
Sales Report by Region and Month
Inventory Analysis
Customer Spending Analysis
User Activity Report
File Structure
Security
- SQL injection prevention via parameterized queries
- CSRF protection on all forms
- User ownership verification on saved reports
- Optional authentication middleware
- Input validation on all endpoints
- Role-based template creation permissions
Troubleshooting
Models Not Appearing
- Verify models are in
app/Modelsdirectory - Check model namespace matches configuration
- Clear cache:
php artisan cache:clear
Dimensions/Metrics Not Loading
- Verify the model's table exists in database
- Test model in tinker:
App\Models\Order::first() - Check browser console for JavaScript errors
Routes Returning 404
Export Not Working
Install optional dependencies:
SQL Errors
- Verify column names match database exactly
- Check that model's
$tableproperty is correct - Test queries in
php artisan tinker
Optional Dependencies
| Package | Purpose | Installation |
|---|---|---|
maatwebsite/excel |
Excel export | composer require maatwebsite/excel |
barryvdh/laravel-dompdf |
PDF export | composer require barryvdh/laravel-dompdf |
Design Patterns
The package implements several design patterns:
- Service Layer - Business logic in dedicated service classes
- Repository Pattern - Models act as repositories for data access
- Factory Pattern -
ExporterFactorycreates appropriate exporters - Strategy Pattern - Different export strategies for each format
- Facade Pattern -
VisualReportBuilderfacade for convenient access - Trait Pattern -
Reportabletrait adds functionality to models
API Response Format
All API endpoints return JSON with consistent format:
Success Response
Error Response
Contributing
Contributions are welcome. When adding features:
- Follow existing architecture patterns
- Keep services single-responsibility
- Add tests for new functionality
- Update this README for user-facing features
- Submit a pull request
License
MIT License - see LICENSE file for details.
Built for developers who want powerful reports without complexity.
All versions of visual-report-builder with dependencies
laravel/framework Version ^8.0|^9.0|^10.0|^11.0|^12.0
maatwebsite/excel Version ^3.1|^4.0
barryvdh/laravel-dompdf Version ^1.0|^2.0