You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using Laravel Auditing with a TINYINT(1) (non-null) column for a boolean field (e.g. hasTubes). In my Eloquent model, I’ve cast this column to a boolean ('hasTubes' => 'boolean'). When I toggle the field in my Filament form between true (1) and false (0), the audit entries sometimes display the old/new values as 1 or 0, but other times they appear blank (see the screenshot below).
Screenshot
Steps to Reproduce:
Use Laravel Auditing on a model with a TINYINT(1) column for a boolean field (e.g. hasTubes), not nullable, default 0.
Cast it to 'boolean' in the model’s $casts array.
In a Filament form, toggle the field from false to true (or vice versa).
View the audit log – notice that old_values or new_values sometimes show 1 / 0 and sometimes display a blank value.
Expected Behavior:
The old_values and new_values should always show 0 or 1 (or true/false) consistently in the audit log, rather than occasionally appearing blank.
Actual Behavior:
Occasionally, the audit log for boolean fields appears blank for one of the values, even though the DB is storing 0 or 1 and the model has a correct boolean cast.