some fix
This commit is contained in:
@ -8,15 +8,15 @@ $json = file_get_contents('simple.json');
|
||||
$table = new ListJsonTable($json);
|
||||
|
||||
//$table->columns([
|
||||
$table->setBeforePrintCell([
|
||||
'status' => function ($ceil) {
|
||||
return getStatusLabel()[$ceil];
|
||||
$table->columns([
|
||||
'status' => function ($cell) {
|
||||
return getStatusLabel()[$cell];
|
||||
},
|
||||
'email' => function ($ceil) {
|
||||
return "<span style='color: aqua'>$ceil</span>";
|
||||
'email' => function ($cell) {
|
||||
return "<span style='color: aqua'>$cell</span>";
|
||||
},
|
||||
'description' => function ($ceil) {
|
||||
return "<span style='color: sienna'>$ceil</span>";
|
||||
'description' => function ($cell) {
|
||||
return "<span style='color: sienna'>$cell</span>";
|
||||
}
|
||||
]);
|
||||
//$table->setBeforePrintCell(function ($key, $data) {
|
||||
|
@ -8,12 +8,12 @@ $json = file_get_contents('view.json');
|
||||
|
||||
$table = new ViewJsonTable($json);
|
||||
//$table->rows([
|
||||
$table->setBeforePrintCell([
|
||||
'username' => function ($ceil) {
|
||||
return "<span style='color: aqua'>$ceil</span>";
|
||||
$table->rows([
|
||||
'username' => function ($cell) {
|
||||
return "<span style='color: aqua'>$cell</span>";
|
||||
},
|
||||
'email' => function ($ceil) {
|
||||
return "<span style='color: firebrick'>$ceil</span>";
|
||||
'email' => function ($cell) {
|
||||
return "<span style='color: firebrick'>$cell</span>";
|
||||
}
|
||||
]);
|
||||
$table->create();
|
||||
|
Reference in New Issue
Block a user