Products
| Product Code | Product Name | Quantity In Stock | Product Line | ||
|---|---|---|---|---|---|
| S10_1678 | exotic lammah | 10,442 | Trucks and Buses | ||
| S10_1949 | Lammer do exoticx86 | 100 | Trains | ||
| S10_2016 | Lammer do exoticx86 | 6,624 | Motorcycles | ||
| S10_4698 | 2003 Harley-Davidson Eagle Drag Bike | 5,582 | Motorcycles | ||
| S10_4757 | 1972 Alfa Romeo GT | 3,252 | Classic Cars | ||
| S10_4962 | test | 6,791 | Classic Cars | ||
| S12_1099 | waqas | 68 | Classic Cars | ||
| S12_1108 | 2001 Ferrari Enzo | 3,619 | Classic Cars | ||
| S12_1666 | 1958 Setra Busy | 1,579 | Trucks and Buses | ||
| S12_2823 | 2002 Suzuki XREO | 9,997 | Trains |
Admin Panel is a new feature of Dashboard Framework which can help to contruct beautiful dashboard admin panel. Setting up different views of your data, applying data search & filter, adding custom actions on your data are all possible.
This example demonstrates creating Product resource to manage your products table.
<?php
namespace demo\admin\product;
use demo\AdminAutoMaker;
use koolreport\dashboard\admin\Resource;
use koolreport\dashboard\fields\ID;
use koolreport\dashboard\fields\Number;
use koolreport\dashboard\fields\Text;
use koolreport\dashboard\inputs\Select;
class Product extends Resource
{
protected function onCreated()
{
$this->manageTable("products")->inSource(AdminAutoMaker::class);
}
protected function fields()
{
return [
ID::create("productCode"),
Text::create("productName"),
Number::create("quantityInStock"),
Text::create("productLine")
->inputWidget(
Select::create()
->dataSource(function(){
return AdminAutoMaker::table("productlines")
->select("productLine");
})
->fields(function(){
return [
Text::create("productLine")
];
})
),
];
}
/**
* The bottom is where you can put extra widgets,
* Here we just put the CodeDemo to show our demo code
* which is not important in your real application.
* @return array
*/
protected function bottom()
{
return [
\demo\CodeDemo::create("
Admin Panel is a new feature of Dashboard Framework which can help to contruct beautiful dashboard
admin panel. Setting up different views of your data, applying data search & filter, adding custom
actions on your data are all possible.
<p>
This example demonstrates creating <code>Product</code> resource to manage your products table.
</p>
")->raw(true)
];
}
}