Part of this changes includes attaching and detaching these relationships, which causes the old_values column to contain a nested array. However, the default Key/Value view doesn't support a nested array like this and throws a TypeError of: htmlspecialchars(): Argument #1 ($string) must be of type string, array given
The included change is a quick fix that checks to see if there is indeed a nested array and if so displays the list of attached/detached IDs. I've also included some classes for minor Dark Mode support.
Improved visibility of key-value span
The background color of the key-value span has been changed to enhance visibility.
Enhanced handling of multiple values in arrays
A nested loop has been added to handle cases where there are multiple values in an array. These values will now be displayed as a comma separated list.
Laravel Auditing 13 allows for tracking related (many/many) changes in Audit History: https://laravel-auditing.com/guide/audit-custom.html#example-related-attributes
Part of this changes includes attaching and detaching these relationships, which causes the
old_values
column to contain a nested array. However, the default Key/Value view doesn't support a nested array like this and throws aTypeError
of:htmlspecialchars(): Argument #1 ($string) must be of type string, array given
The included change is a quick fix that checks to see if there is indeed a nested array and if so displays the list of attached/detached IDs. I've also included some classes for minor Dark Mode support.