Skip to content

Missing columns in csv export. Cannot export casting boolean fields. #5198

@cable8mm

Description

@cable8mm
  • Laravel Version: 9.45.1
  • Nova Version: v4.19.5
  • PHP Version: 8.1.13
  • Database Driver & Version: mysql & 8.0.31
  • Operating System and Version: macOS Ventura 13.0.1
  • Browser type and version: Chrome 108.0.5359.124 (Official Build) (x86_64)
  • Reproduction Repository: https://github.com/###/###

Description:

has_caption and is_active are tinyint type.

Model:

    protected $casts = [
        'has_caption' => 'boolean',
        'is_active' => 'boolean',
    ];

Missing two columns in csv export.

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Create a table & model include tinyint type columns.
  2. Cast boolean.
  3. Create resource.
  4. Add ExportAsCsv::make() action.
  5. Export as csv.
  6. Missing the field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions