Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
4bdd883d67 | |||
f9fc6b9f17 | |||
338555d62c |
@ -25,7 +25,8 @@ class ListJsonTable
|
||||
public function __construct(string $json)
|
||||
{
|
||||
$this->beforePrintCell = false;
|
||||
$this->beforePrint = function (){};
|
||||
$this->beforePrint = function () {
|
||||
};
|
||||
$this->json = $json;
|
||||
$this->data = json_decode($this->json, true);
|
||||
$this->baseUrl = $this->data['meta']['baseUrl'] ?? '';
|
||||
@ -69,7 +70,7 @@ class ListJsonTable
|
||||
foreach ($this->data['data'] as $col) {
|
||||
$this->html .= "<tr>";
|
||||
$this->count += 1;
|
||||
$this->html .= '<td><a href=' . $this->baseUrl . "/form-item/" . $col["id"] . '>' . $this->count . '</a></td>';
|
||||
$this->html .= '<td><a href=' . $this->baseUrl . "/" . $col["id"] . '>' . $this->count . '</a></td>';
|
||||
foreach ($col as $key => $row) {
|
||||
if ($this->issetColumn($key) and $this->is_fillable($key)) {
|
||||
if ($this->beforePrintCell) {
|
||||
@ -126,8 +127,7 @@ class ListJsonTable
|
||||
if (in_array($column, $this->data['meta']['fillable'])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user