add integer format
This commit is contained in:
@ -7,22 +7,23 @@ use Itguild\Tables\ListJsonTable;
|
||||
$json = file_get_contents('simple.json');
|
||||
$table = new ListJsonTable($json);
|
||||
|
||||
//$table->columns([
|
||||
$table->columns([
|
||||
"created_at" => [
|
||||
"format" => "date:Y-m-d",
|
||||
"format" => "date:Y-m-d"
|
||||
],
|
||||
'description' => [
|
||||
"format" => "html",
|
||||
"style" => ["width" => "300px"],
|
||||
"filter" => '',
|
||||
"filter" => function () {},
|
||||
"value" => function ($cell) {
|
||||
return "<span style='color: sienna'>$cell</span>";
|
||||
}
|
||||
],
|
||||
'status' => function ($cell) {
|
||||
return getStatusLabel()[$cell];
|
||||
},
|
||||
'status' => [
|
||||
"format" => "integer",
|
||||
"value" => function ($cell) {
|
||||
return getStatusLabel()[$cell];
|
||||
}],
|
||||
'email' => function ($cell) {
|
||||
return "<span style='color: aqua'>$cell</span>";
|
||||
},
|
||||
|
Reference in New Issue
Block a user