> For the complete documentation index, see [llms.txt](https://helpdocs.quickadminpanel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocs.quickadminpanel.com/modules/dashboard-and-reports.md).

# Dashboard and Reports

This module allows you to add multiple Report Widgets to your Dashboard. There are five types of Widgets, each with its own parameters.

![](https://laraveldaily.com/wp-content/uploads/2019/03/module-dashboard-reports-widget.png)

&#x20;You can create as many widgets as you want, specifying width for each of them, this way constructing your whole dashboard.

&#x20;Video demo of the module:

{% embed url="<https://www.youtube.com/watch?v=O3ESvZMF9C0>" %}

\
&#x20;In downloaded code, we generate **HomeController.php** which may look like this:

```
use LaravelDaily\LaravelCharts\Classes\LaravelChart;

class HomeController
{
    public function index()
    {
        $settings1 = [
            'chart_title'        => 'Users By Day',
            'chart_type'         => 'line',
            'report_type'        => 'group_by_date',
            'model'              => 'App\User',
            'group_by_field'     => 'created_at',
            'group_by_period'    => 'day',
            'aggregate_function' => 'count',
            'filter_field'       => 'created_at',
            'filter_days'        => '30',
            'column_class'       => 'col-md-12',
            'entries_number'     => '5',
        ];

        $chart1 = new LaravelChart($settings1);

        $settings2 = [
            'chart_title'        => 'Latest Users',
            'chart_type'         => 'latest_entries',
            'report_type'        => 'group_by_date',
            'model'              => 'App\User',
            'group_by_field'     => 'email_verified_at',
            'group_by_period'    => 'day',
            'aggregate_function' => 'count',
            'filter_field'       => 'created_at',
            'column_class'       => 'col-md-12',
            'entries_number'     => '5',
            'fields'             => [
                '0' => 'name',
                '1' => 'email',
                '2' => 'created_at',
            ],
        ];

        $settings2['data'] = $settings2['model']::latest()
            ->take($settings2['entries_number'])
            ->get();

        return view('home', compact('chart1', 'settings2'));
    }
}
```

\
&#x20;You can also group entries by relationships, see video:

{% embed url="<https://www.youtube.com/watch?v=geYLwf8jLCU>" %}

&#x20;For viewing charts, we use our own simple package called [Laravel Charts](https://github.com/LaravelDaily/laravel-charts).
