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.
Additional Context:
- Model casting array:
protected $casts = [
'hasTubes' => 'boolean',
// ...
];
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 betweentrue(1) andfalse(0), the audit entries sometimes display the old/new values as1or0, but other times they appear blank (see the screenshot below).Screenshot
Steps to Reproduce:
hasTubes), not nullable, default0.'boolean'in the model’s$castsarray.falsetotrue(or vice versa).old_valuesornew_valuessometimes show1/0and sometimes display a blank value.Expected Behavior:
old_valuesandnew_valuesshould always show0or1(ortrue/false) consistently in the audit log, rather than occasionally appearing blank.Actual Behavior:
0or1and the model has a correct boolean cast.Additional Context: