Compare commits
7 Commits
a71102eb05
...
093b04c2c9
Author | SHA1 | Date | |
---|---|---|---|
093b04c2c9 | |||
b24fac512a | |||
7a7241746a | |||
95c3c0755b | |||
ea83698070 | |||
c4b3f46111 | |||
625089acd1 |
@ -94,7 +94,9 @@ class RestController
|
|||||||
$model = $this->model->where('id', $id)->first();
|
$model = $this->model->where('id', $id)->first();
|
||||||
|
|
||||||
foreach ($model->getFillable() as $item){
|
foreach ($model->getFillable() as $item){
|
||||||
$model->{$item} = $data[$item] ?? null;
|
if (!empty($data[$item])){
|
||||||
|
$model->{$item} = $data[$item] ?? null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$model->save();
|
$model->save();
|
||||||
|
@ -30,7 +30,6 @@ $meta['total'] = $module_count;
|
|||||||
|
|
||||||
$info_to_table['meta'] = $meta;
|
$info_to_table['meta'] = $meta;
|
||||||
$info_to_table['data'] = $modules_info;
|
$info_to_table['data'] = $modules_info;
|
||||||
$info_to_table['filters'] = ['type'/*, 'author'*/];
|
|
||||||
|
|
||||||
$table = new ListJsonTable(json_encode($info_to_table, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
$table = new ListJsonTable(json_encode($info_to_table, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||||
|
|
||||||
@ -40,6 +39,16 @@ $table->addAction(function ($row, $url) use ($moduleService) {
|
|||||||
return \kernel\widgets\IconBtn\IconBtnViewWidget::create(['url' => $url])->run();
|
return \kernel\widgets\IconBtn\IconBtnViewWidget::create(['url' => $url])->run();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$table->columns([
|
||||||
|
'type' => [
|
||||||
|
'filter' => [
|
||||||
|
'class' => \Itguild\Tables\Filter\SelectFilter::class,
|
||||||
|
'param' => ['kernel', 'entity'],
|
||||||
|
'value' => "kernel"
|
||||||
|
],
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
$table->addAction(function ($row, $url) use ($moduleService){
|
$table->addAction(function ($row, $url) use ($moduleService){
|
||||||
if ($row['slug'] !== 'kernel') {
|
if ($row['slug'] !== 'kernel') {
|
||||||
if ($moduleService->isInstall($row['slug'])) {
|
if ($moduleService->isInstall($row['slug'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user