PHPackages                             bernadev/laravel-reports - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bernadev/laravel-reports

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bernadev/laravel-reports
========================

Scaffolding to generate data reports in a unified way

0.1.1(3y ago)010MITPHPPHP &gt;=7.4

Since Jul 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bernadev91/laravel-reports)[ Packagist](https://packagist.org/packages/bernadev/laravel-reports)[ RSS](/packages/bernadev-laravel-reports/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

laravel-reports
===============

[](#laravel-reports)

Scaffolding to generate data reports in a unified way

To install, simply run the following command:

`composer require bernadev/laravel-reports`

This package is intended to make the creation of new reports faster and easier to maintain. To do so, it establishes an interface all reports must implement. With this library, when you need to create a new report, all you have to do is the following:

1. Create a route for it
2. Write a couple of class methods
3. Write a Blade template to render the results.

This class helps in the following ways:

1. Artisan command to create new reports. Just run `php artisan reports:generate` . It will ask for the details of the new report and it will create a class and a view for it.
2. Interface all report classes must implement with common methods.
3. Blade view that shows the list of filters. Using Bootstrap 5.

Filtering
=========

[](#filtering)

Example of how setting the filters work. You have to create an associative array where the key is the name of the field and it contains a set of properties.

- `name`: the name the user will see in the page.
- `value`: value given to the filter.
- `type`: type of filter. Possible values accepted so far:
    - `date`: it will render a date-picker field. Depends on having this library available:  and adding the picker to all elements with the class `.date-picker`

```
    public function __construct(array $input_data=array())
    {
        $this->filters = [
            'start_date' => ['name' => 'Start Date', 'value' => NULL, 'type' => 'date'],
            'end_date' => ['name' => 'End Date', 'value' => NULL, 'type' => 'date']
        ];

        if (Arr::get($input_data, 'start_date'))
        {
            $this->filters['start_date']['value'] = MY::parseDate($input_data['start_date'])->startOfDay();
        }
        else
        {
            $this->filters['start_date']['value'] = now()->subMonth()->startOfDay();
        }

        if (Arr::get($input_data, 'end_date'))
        {
            $this->filters['end_date']['value'] = MY::parseDate($input_data['end_date'])->endOfDay();
        }
        else
        {
            $this->filters['end_date']['value'] = now()->endOfDay();
        }
    }

```

Example where we filter by a date range and by default the value is -1 month until today.

Controller
==========

[](#controller)

The controller and the routing is managed by the developer. You have to make sure there's a route linking to the new report. In that controller/route, in order to load the report all you have to do is something like this:

```
use Bernadev\LaravelReports\Loader;

public function generate($report, Request $request)
{
   $report = Loader::load($report, $request->all());

   $view_data['report'] = $report;
   $view_data['results'] = $report->generate();

   return view($report->getView(), $view_data);
}

```

1. Load the report by passing the "slug" field (set when creating the report).
2. Pass the report object and the results to the view
3. Render the view. We can use the getView() method to retrieve its location.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1381d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81df8f7b099ea35a3e8bb0914ad306878b0553f21e59ab97e81df56b48adf156?d=identicon)[bernadev](/maintainers/bernadev)

---

Top Contributors

[![bernadev91](https://avatars.githubusercontent.com/u/55087808?v=4)](https://github.com/bernadev91 "bernadev91 (6 commits)")

### Embed Badge

![Health badge](/badges/bernadev-laravel-reports/health.svg)

```
[![Health](https://phpackages.com/badges/bernadev-laravel-reports/health.svg)](https://phpackages.com/packages/bernadev-laravel-reports)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
