Skip to content

Laravel admin dashboard with charts, summary reports, filtering, and Excel export.

Notifications You must be signed in to change notification settings

amarhumayunx/dashboard-admin

Repository files navigation

Admin Dashboard – Data Visualization

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.


About the project

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.


Tech stack

Requirement Used
PHP 8.2+
Framework Laravel 11
Chart libraries Chart.js (CDN)
Database MySQL or SQLite
Export Maatwebsite/Excel
Git Yes

Features

  • 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.

Screens

  • 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.

Setup

1. Clone and install

git clone <your-repo-url> dashboard-app
cd dashboard-app
composer install

2. Environment

cp .env.example .env
php artisan key:generate

3. Database

Option A – SQLite (default, no MySQL needed)

.env already has DB_CONNECTION=sqlite. Run:

php artisan migrate
php artisan db:seed

Option 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_password

Then:

php artisan migrate
php artisan db:seed

4. Run

php artisan serve

Open http://localhost:8000/dashboard


Routes

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

License

MIT