Bottom
Overview #
Bottom is extra section at bottom of screen which allows you the flexibility to customize in Admin Panel.
Usages #
Resource #
Bottom is added to resource by overriding the bottom()
method of Resource:
class Customer extends Resource
{
protected function bottom()
{
return [
Html::div("Any content"),
TrendMetric::create()
...
];
}
}
Glass #
Bottom is added to glass by overriding the bottom()
method of Glass:
class MostValueCustomerGlass extends Glass
{
protected function bottom()
{
return [
CustomerPaymentValue::create(),
CustomerOrderTrend::create(),
...
];
}
}
DetailScreen #
Adding bottom to detail screen is slightly different which you do which you need to set in an anonymous function that received $id
of resource as parameter.
class Customer extends Resource
{
protected function onCreated()
{
$this->detailScreen()->bottom(function($id){
// You receive $id is the id value of record
// You return a list of widgets here
return [
ThisCustomerOrderTrend::create(),
ThisCustomerOrderValue::create(),
...
];
});
}
}
UpdateScreen #
You can add widget to bottom of UpdateScreen
class Customer extends Resource
{
protected function onCreated()
{
$this->updateScreen()->bottom(function($id){
// You receive $id is the id value of record
// You return a list of widgets here
return [
ThisCustomerOrderTrend::create(),
ThisCustomerOrderValue::create(),
...
];
});
}
}
CreateScreen #
You can add widget to bottom of UpdateScreen
class Customer extends Resource
{
protected function onCreated()
{
$this->createScreen()->bottom(function($id){
// You receive $id is the id value of record
// You return a list of widgets here
return [
ThisCustomerOrderTrend::create(),
ThisCustomerOrderValue::create(),
...
];
});
}
}
Get started with KoolReport
KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.