Blog Detail

23

Dec
Laravel Bi - A Business Intelligence Dashboard Manager cover image

arrow_back Laravel Bi - A Business Intelligence Dashboard Manager

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

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.

Requirements

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

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 a different tool. Each widget’s metrics and dimensions are fully customizable.

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

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 are attributes of your data. Laravel-Bi is shipped with some pre-configured dimensions:

  • StringDimension
  • YearDimension
  • MonthDimension
  • DayDimension
  • DateDimension
  • BelongsToDimension
  • RawDimension

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 are quantitative measurements. Each metric show absolute values. If you need to show the percentage of the total, you can use asPercentage() method Laravel-Bi is shipped with some preconfigured metrics:

CountMetric
SumMetric
AverageMetric
RawMetric

Custom metrics

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

For more details, please visit Github.

Published at : 23-12-2022

Author : Rizwan Aslam
AUTHOR
Rizwan Aslam

I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.

Launch your project

Launch project