Table Column for json value
I'm trying to create a view to display the audits table from the https://laravel-auditing.com project.
The problem is that the old_values and new_values columns store data in json format of the type: {"usr_modificacion":1,"observaciones":"x"} and when it is displayed in the view, only the value of the field is displayed and not the name. In the example above it shows: 1, x.
Can you give me some idea of how to display something like:
usr_modificacion:1, observaciones: x?
I am working with version 2 of filament.
Thanks
Laravel Auditing
Laravel Auditing
Laravel Auditing allows you to record changes to an Eloquent model's set of data by simply adding its trait to your model.
3 Replies
Maybe something like this, if you have an
array
cast on your model:
Did you try: https://github.com/TappNetwork/filament-auditing
GitHub
GitHub - TappNetwork/filament-auditing: A Filament plugin for Larav...
A Filament plugin for Laravel Auditing package. . Contribute to TappNetwork/filament-auditing development by creating an account on GitHub.
Using $casts inside the model gets job done π