formats and style
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
{"id": 1,"email":"fas1@mail.ru","description":"sdgsdfg","description2":"ffdghdas", "created_at": "17.06.2024", "status": 1},
|
||||
{"id": 2,"email":"fas2@mail.ru","description":"fafdgdfgsdfdfs","description2":"ffdghdas", "created_at": "18.06.2024", "status": 1},
|
||||
{"id": 3,"email":"fas3@mail.ru","description":"fafdgdssdfgdfs","description2":"ffdghdas", "created_at": "19.06.2024", "status": 2},
|
||||
{"id": 4,"email":"fas4@mail.ru","description":"fafddsfgsdvcbgdfs","description2":"ffdghdas", "created_at": "20.06.2024", "status": 1},
|
||||
{"id": 4,"email":"fas4@mail.ru","description":"fafd <b>dsfgsd</b> vcbgdfs","description2":"ffdghdas", "created_at": "20.06.2024", "status": 1},
|
||||
{"id": 5,"email":"fas5@mail.ru","description":"fafdgghjgfdfs","description2":"ffdghdas", "created_at": "21.06.2024", "status": 1},
|
||||
{"id": 6,"email":"fas6@mail.ru","description":"fafddfgdhvgdfs","description2":"ffdghdas", "created_at": "22.06.2024", "status": 1},
|
||||
{"id": 7,"email":"fas7@mail.ru","description":"fafdfgnfdgdfs","description2":"ffdghdas", "created_at": "23.06.2024", "status": 0},
|
||||
|
@ -12,8 +12,12 @@ $table->columns([
|
||||
"created_at" => [
|
||||
"format" => "date:Y-m-d",
|
||||
],
|
||||
'description2' => [
|
||||
"format" => "html:",
|
||||
'description' => [
|
||||
"format" => "html",
|
||||
"style" => ["width" => "300px"],
|
||||
"value" => function ($cell) {
|
||||
return "<span style='color: sienna'>$cell</span>";
|
||||
}
|
||||
],
|
||||
'status' => function ($cell) {
|
||||
return getStatusLabel()[$cell];
|
||||
@ -21,9 +25,6 @@ $table->columns([
|
||||
'email' => function ($cell) {
|
||||
return "<span style='color: aqua'>$cell</span>";
|
||||
},
|
||||
'description' => function ($cell) {
|
||||
return "<span style='color: sienna'>$cell</span>";
|
||||
}
|
||||
]);
|
||||
//$table->setBeforePrintCell(function ($key, $data) {
|
||||
// return $key == "email" ? "<span style='color: aqua'>$data</span>" : $data;
|
||||
|
Reference in New Issue
Block a user