PHPackages                             loonatx/laravel-bi-10 - 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. [Admin Panels](/categories/admin)
4. /
5. loonatx/laravel-bi-10

ActiveLibrary[Admin Panels](/categories/admin)

loonatx/laravel-bi-10
=====================

A beautiful and fully-featured Business Intelligence dashboard manager for Laravel

0.0.0(1y ago)14MITPHPPHP &gt;=7.3.0

Since Sep 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/loonatx/laravel-bi-10)[ Packagist](https://packagist.org/packages/loonatx/laravel-bi-10)[ RSS](/packages/loonatx-laravel-bi-10/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Bi
----------

[](#laravel-bi)

Laravel Bi is a beautiful and fully-featured Business Intelligence dashboard manager for Laravel.

[![Build Status](https://camo.githubusercontent.com/44eb1d59cfa0a12a174ab10c4bbdc12be363eb6057677cf7f8bb6d77abff1177/68747470733a2f2f7472617669732d63692e6f72672f6c61726176656c2d62692f6c61726176656c2d62692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/laravel-bi/laravel-bi)[![StyleCI](https://camo.githubusercontent.com/31401f965eaf425bb2019c8a100bb2f791390c4517a10070787a430e70387579/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3230333435313136342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/203451164)

[![Laravel BI](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/bi.png)](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/bi.png)

### Installation

[](#installation)

Install Laravel Bi using composer:

`composer require laravel-bi/laravel-bi`

and then run

`php artisan bi:install`

to setup all Laravel Bi components and to create a simple UserDashboard.

### Updating

[](#updating)

Run this artisan command to update assets: `php artisan vendor:publish --tag=bi-assets --force`

### Requirements

[](#requirements)

Laravel BI v1.0.0 requires Laravel 8.0. If you have a previous Laravel version, please consider to use v0.0.5.

#### User Authentication

[](#user-authentication)

Laravel BI requires users to be logged. If your application does not have a custom authentication process, I suggest you to install [Laravel Breeze](https://laravel.com/docs/8.x/starter-kits#laravel-breeze).

#### Add new dashboards

[](#add-new-dashboards)

You can add new dashboard to your project using this command

`php artisan bi:dashboard FooDashboard --model=FooModel`

### Main features and concept

[](#main-features-and-concept)

Laravel Bi uses `dashboards` to show data to the users. Each dashboard contains `widgets`. Each widget presents data to your user using different tool. Each widget's `metrics` and `dimensions` are fully customizable.

**At the moment, Laravel BI works only with mysql databases.**

### Attributes

[](#attributes)

Attributes are common representation of Dimension and Metric. You can instantiate Attribute using `create` static method. It accepts 2 parameters:

- key: a mandatory internal identifier
- name: a mandatory label

```
StringDimension::create('name', 'The Name');
SumMetric::create('unique_name_for_some_of_prices', 'The Sum');
```

Some extra methods are available:

- `column($columnName)` to set a custom database column name (defaulted to key)
- `color($color)` to set a custom color for the attribute (it will be used in charts)

You can chain all these methods:

```
SumMetric::create('unique_name_for_some_of_prices', 'The Sum')
    ->column('price_column')
    ->color('#FF0000');
```

#### Dimensions

[](#dimensions)

Dimensions are attributes of your data. Laravel-Bi is shipped with some preconfigured dimensions:

#### `StringDimension`

[](#stringdimension)

It represents a string column. No transformation or logic are applied. It comes to your widget as it is saved in your database.

#### `YearDimension`

[](#yeardimension)

It represents a year. It applies a `DATE_FORMAT` clause to your database query in order to take only year digits. Its default format is `%Y` (e.g. *2019*).

#### `MonthDimension`

[](#monthdimension)

It represents a month. It applies a `DATE_FORMAT` clause to your database query in order to take only year and month digits. Its default format is `%Y-%m` (e.g. *2019-01*).

#### `DayDimension`

[](#daydimension)

It represents a day. It applies a `DATE_FORMAT` clause to your database query in order to take only year, month and day digits. Its default format is `%Y-%m-%d` (e.g. *2019-01-15*).

#### `DateDimension`

[](#datedimension)

It represents a date. It allows to set a custom `DATE_FORMAT` clause using `format()` method.

It has a one custom method:

- `format($format)` to set a custom DATE\_FORMAT format.

```
DateDimension::create('year_week', 'Year Week')
    ->format('%Y-%u');
```

#### `BelongsToDimension`

[](#belongstodimension)

It represents a string value taken from a BelongsTo relationship. It comes from a JOIN clause in order to use it in filters or in sorting.

It has a two custom methods:

- `relation($relationName)` to set a eloquent relation name
- `otherColumn($columnName)` to set the related object column

```
BelongsToDimension::create('product_name', 'Product')
    ->relation('product')
    ->otherColumn('name');
```

#### `RawDimension`

[](#rawdimension)

It represents a raw dimension you can edit as you want using `raw` method.

It has a one custom method:

- `raw($rawClause)` to set a custom raw clause

```
DateDimension::create('initial_of_name', 'Initial')
    ->raw('LEFT(name, 1)');
```

#### Create your Custom dimensions

[](#create-your-custom-dimensions)

You can easily use them in your widgets or create your custom dimensions. Please take a look to the existing dimensions.

#### Metrics

[](#metrics)

Metrics are quantitative measurements. Each metric show absolute values. If you need to show percentage of the total, you can use `asPercentage()` method Laravel-Bi is shipped with some preconfigured metrics:

#### `CountMetric`

[](#countmetric)

It is a simple metric that count number of records. This is not related to a particular column.

#### `SumMetric`

[](#summetric)

It sums a particular column values.

#### `AverageMetric`

[](#averagemetric)

It calculate average of a particular column values.

#### `RawMetric`

[](#rawmetric)

It represents a raw metric you can edit as you want using `raw` method.

It has a one custom method:

- `raw($rawClause)` to set a custom raw clause

```
DateDimension::create('discounted_price', 'Discounted Price')
    ->raw('price * 0.9');
```

#### Custom metrics

[](#custom-metrics)

You can easily use them in your widgets or create your custom dimensions. Please take a look to the existing metrics.

#### Widgets

[](#widgets)

Widgets are graphical representation of your data that use Dimensions and Metrics to gather information. You can instantiate Widgets using `create` static method. It accept 2 parameters:

- key: a mandatory internal identifier
- name: a mandatory label

```
BigNumber::create('order_number', 'Orders')
```

You can attach attributes to a widget using:

- `dimensions($dimensions)` to set an array of dimensions
- `dimension($dimension)` to set a single dimension
- `metrics($metrics)` to set an array of metrics
- `metric($metric)` to set a single metric

```
Table::create('table', 'Table')
    ->dimension([
        BelongsToDimension::create('product', 'Product')
            ->relation('product')
            ->otherColumn('name');
    ])
    ->metrics([
        SumMetric::create('price', 'Revenues')
    ]);
```

Some extra methods are available:

- `width($widthClass)` to set a custom width (it should be a Tailwind CSS `w-` class)
- `scope($closuer)` to set a particular scope for a widget

You can chain all these methods:

```
BigNumber::create('order_number_with_price_greater_than_10', 'Big Orders')
    ->width('w-1/2')
    ->scope(function(Builder $builder) {
        return $builder->where('price', '>', 10);
    });
```

Laravel-Bi is shipped with some preconfigured widgets:

#### `BigNumber`

[](#bignumber)

It shows a particular and relevant metric as a KPI. It accept a single metric.

[![Big Number Widget](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/big-number.png)](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/big-number.png)

#### `Table`

[](#table)

It shows some dimensions and metrics organized in a table allowing user to apply a custom sorting. It accept multiple dimensions and metrics.

It has a one custom method:

- `orderBy($column, $dir)` to set a custom orderBy clause

```
Table::create('user-per-country', 'User per Country')
    ->dimensions([
        StringDimension::create('country_code', 'Country'),
    ])
    ->metrics([
        CountMetric::create('count', 'Count'),
    ])
    ->orderBy('count', 'desc')
```

#### `LineChart`

[](#linechart)

It shows a line chart with different axis on a single horizontal dimension. It accept a single dimension and multiple metrics.

[![Line Chart Widget](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/line-chart.png)](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/line-chart.png)

#### `PartitionPie`

[](#partitionpie)

It shows a pie chart with a single metric and a single dimension. It accept a single dimension and a single metric.

[![Partition Pie Widget](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/partition-pie.png)](https://raw.githubusercontent.com/laravel-bi/laravel-bi/master/screenshots/partition-pie.png)

#### Filters

[](#filters)

Filters are special tools that allow users to filter data in each dashboard. You can instantiate Widgets using `create` static method. It accept 2 parameters:

- key: a mandatory internal identifier and column name
- name: a mandatory label

```
StringFilter::create('type', 'Type')
```

Laravel Bi is shipped with some preconfigured filters:

#### `StringFilter`

[](#stringfilter)

It shows a multiple combo with all the possible values of a particular column.

#### `NumberFilter`

[](#numberfilter)

It shows a number control to select different operators.

#### `DateFilter`

[](#datefilter)

It shows a calendar to select a date.

#### `DateIntervalFilter`

[](#dateintervalfilter)

It shows a range calendar to select a day interval.

#### Dashboard configuration

[](#dashboard-configuration)

Each dashboard presents 2 method: `filters()` and `widgets()` and 3 properties `model`, `uriKey`, `name`. You have to implement methods returning respectively a list of filters and a list of widget.

```
public function widgets()
{
    return [
        BigNumber::create('post-count', 'Number of Posts')
            ->metric(CountMetric::create('count', 'Count'))
            ->width('w-1/2')
    ];
}
```

#### Thanks to

[](#thanks-to)

Thanks to

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

595d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/14f9aae7bd815ec401f48359ea5c2bfec3e09c7c858b7ba802963394a06cc6e3?d=identicon)[loonatx](/maintainers/loonatx)

---

Top Contributors

[![jujutsucode](https://avatars.githubusercontent.com/u/138183266?v=4)](https://github.com/jujutsucode "jujutsucode (1 commits)")[![loonatx](https://avatars.githubusercontent.com/u/182711466?v=4)](https://github.com/loonatx "loonatx (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/loonatx-laravel-bi-10/health.svg)

```
[![Health](https://phpackages.com/badges/loonatx-laravel-bi-10/health.svg)](https://phpackages.com/packages/loonatx-laravel-bi-10)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k4.8M43](/packages/jeroennoten-laravel-adminlte)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[dwij/laraadmin

LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like CRUD Generation, Module Manager, Media, Menus, Backups and much more

1.6k68.7k](/packages/dwij-laraadmin)[filament/spatie-laravel-media-library-plugin

Filament support for `spatie/laravel-medialibrary`.

1764.8M125](/packages/filament-spatie-laravel-media-library-plugin)[bezhansalleh/filament-exceptions

A Simple &amp; Beautiful Pluggable Exception Viewer for FilamentPHP's Admin Panel

193195.9k13](/packages/bezhansalleh-filament-exceptions)[filament/infolists

Easily add beautiful read-only infolists to any Livewire component.

1220.8M36](/packages/filament-infolists)

PHPackages © 2026

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