Laravel admin dashboard with charts, summary reports, filtering, and Excel export.
An admin dashboard that visualizes system data using interactive charts and reports. Built with PHP 8+, Laravel 11, Chart.js, and MySQL/SQLite. Includes data filtering, admin analytics, and report export to XLSX.
This project implements an admin dashboard that:
- Visualizes data with line and doughnut charts (metrics over time and by type).
- Summarizes metrics (total value, record count, users, activities) in cards and an admin summary view.
- Lets admins filter by date range and metric type.
- Exports reports to Excel (XLSX) for the selected date range.
It meets requirements for a dashboard with charts, filtering controls, report export, and an admin summary view. Default database is SQLite so you can run it without MySQL.
| Requirement | Used |
|---|---|
| PHP | 8.2+ |
| Framework | Laravel 11 |
| Chart libraries | Chart.js (CDN) |
| Database | MySQL or SQLite |
| Export | Maatwebsite/Excel |
| Git | Yes |
- Data visualization charts – Line chart (metrics over time), doughnut chart (by metric type).
- Summary reports – Total metrics value, metric records, users, activities.
- Admin analytics – Admin summary view with top metrics by type.
- Filterable dashboards – Filter by date range and metric type.
- Report export – Export filtered data to XLSX.
- Dashboard – Charts, filters, summary cards, export button.
- Data filtering – Date from/to, metric type dropdown, Apply filter.
- Report export – XLSX download with current filter (date_from, date_to).
- Admin summary – Summary cards and top metrics table with date filter.
git clone <your-repo-url> dashboard-app
cd dashboard-app
composer installcp .env.example .env
php artisan key:generateOption A – SQLite (default, no MySQL needed)
.env already has DB_CONNECTION=sqlite. Run:
php artisan migrate
php artisan db:seedOption B – MySQL
Create a database (e.g. task1_dashboard), set in .env:
DB_CONNECTION=mysql
DB_DATABASE=task1_dashboard
DB_USERNAME=root
DB_PASSWORD=your_passwordThen:
php artisan migrate
php artisan db:seedphp artisan serveOpen http://localhost:8000/dashboard
| Method | URI | Description |
|---|---|---|
| GET | /dashboard |
Main dashboard (charts, filters, summary) |
| GET | /dashboard/filter |
Filtered dashboard (query: date_from, date_to, metric_type) |
| GET | /reports/export |
Export report as XLSX (query: date_from, date_to) |
| GET | /admin/summary |
Admin summary view with top metrics |
MIT