post beta fix
This commit is contained in:
parent
89b127fd72
commit
95f56a04d3
@ -3,6 +3,7 @@
|
||||
namespace kernel\IGTabel;
|
||||
|
||||
use app\helpers\Debug;
|
||||
use app\models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ViewJsonTableEloquentModel
|
||||
@ -18,7 +19,14 @@ class ViewJsonTableEloquentModel
|
||||
$this->meta['params'] = $params['params'] ?? [];
|
||||
$this->meta['actions'] = $params['actions'] ?? [];
|
||||
|
||||
$this->jsonStr = (new JSONCreator($this->meta, $model->toArray()))->getJson();
|
||||
// $this->jsonStr = (new JSONCreator($this->meta, $model->toArray()))->getJson();
|
||||
$model = $model->toArray();
|
||||
if(isset($model['user_id']))
|
||||
{
|
||||
$model['user_id'] = User::find($model['user_id'])->username;
|
||||
}
|
||||
|
||||
$this->jsonStr = (new JSONCreator($this->meta, $model))->getJson();
|
||||
}
|
||||
|
||||
public function getJson(): ?string
|
||||
|
Loading…
Reference in New Issue
Block a user