{"owner":"SpartnerNL","repo":"Laravel-Excel","hasSkills":true,"totalSkillsCount":3,"totalTokensCount":5642,"categories":["anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":["resources/boost/skills/examples/exports-imports.md","resources/boost/skills/laravel-excel/SKILL.md","resources/boost/skills/references/package.md"],"skills":{"resources/boost/skills/examples/exports-imports.md":"# Laravel Excel Examples\n\nThese examples are representative patterns. For complete feature coverage, use `../references/package.md`.\n\n## Collection Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Collection;\nuse Maatwebsite\\Excel\\Concerns\\FromCollection;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass UsersExport implements FromCollection, WithHeadings, WithMapping\n{\n    public function collection(): Collection\n    {\n        return User::query()->latest()->get();\n    }\n\n    public function headings(): array\n    {\n        return ['Name', 'Email', 'Created At'];\n    }\n\n    public function map($user): array\n    {\n        return [\n            $user->name,\n            $user->email,\n            $user->created_at?->toDateTimeString(),\n        ];\n    }\n}\n```\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nreturn Excel::download(new UsersExport, 'users.xlsx');\n```\n\n## Queued Query Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\Order;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Maatwebsite\\Excel\\Concerns\\FromQuery;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomChunkSize;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass OrdersExport implements FromQuery, ShouldQueue, WithCustomChunkSize, WithHeadings, WithMapping\n{\n    public function query(): Builder\n    {\n        return Order::query()->with('customer')->whereNotNull('paid_at');\n    }\n\n    public function headings(): array\n    {\n        return ['Order', 'Customer', 'Total', 'Paid At'];\n    }\n\n    public function map($order): array\n    {\n        return [\n            $order->number,\n            $order->customer->name,\n            $order->total,\n            $order->paid_at?->toDateString(),\n        ];\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\nExcel::queue(new OrdersExport, 'exports/orders.xlsx', 's3');\n```\n\n## Multi-Sheet Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\WithMultipleSheets;\n\nclass ReportsWorkbookExport implements WithMultipleSheets\n{\n    public function sheets(): array\n    {\n        return [\n            'users' => new UsersExport,\n            'orders' => new OrdersExport,\n        ];\n    }\n}\n```\n\n## Styling, Events, And CSV Settings\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\FromArray;\nuse Maatwebsite\\Excel\\Concerns\\ShouldAutoSize;\nuse Maatwebsite\\Excel\\Concerns\\WithColumnFormatting;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomCsvSettings;\nuse Maatwebsite\\Excel\\Concerns\\WithEvents;\nuse Maatwebsite\\Excel\\Concerns\\WithStyles;\nuse Maatwebsite\\Excel\\Events\\AfterSheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RevenueExport implements FromArray, ShouldAutoSize, WithColumnFormatting, WithCustomCsvSettings, WithEvents, WithStyles\n{\n    public function array(): array\n    {\n        return [\n            ['Month', 'Revenue'],\n            ['January', 12345.67],\n        ];\n    }\n\n    public function columnFormats(): array\n    {\n        return [\n            'B' => NumberFormat::FORMAT_CURRENCY_USD_SIMPLE,\n        ];\n    }\n\n    public function getCsvSettings(): array\n    {\n        return [\n            'delimiter' => ';',\n            'use_bom' => true,\n        ];\n    }\n\n    public function registerEvents(): array\n    {\n        return [\n            AfterSheet::class => function (AfterSheet $event): void {\n                $event->sheet->freezePane('A2');\n            },\n        ];\n    }\n\n    public function styles(Worksheet $sheet): array\n    {\n        return [\n            1 => ['font' => ['bold' => true]],\n        ];\n    }\n}\n```\n\n## Validated Chunked Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse App\\Models\\User;\nuse Maatwebsite\\Excel\\Concerns\\Importable;\nuse Maatwebsite\\Excel\\Concerns\\SkipsFailures;\nuse Maatwebsite\\Excel\\Concerns\\SkipsOnFailure;\nuse Maatwebsite\\Excel\\Concerns\\ToModel;\nuse Maatwebsite\\Excel\\Concerns\\WithBatchInserts;\nuse Maatwebsite\\Excel\\Concerns\\WithChunkReading;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadingRow;\nuse Maatwebsite\\Excel\\Concerns\\WithValidation;\n\nclass UsersImport implements SkipsOnFailure, ToModel, WithBatchInserts, WithChunkReading, WithHeadingRow, WithValidation\n{\n    use Importable;\n    use SkipsFailures;\n\n    public function model(array $row): User\n    {\n        return new User([\n            'name' => $row['name'],\n            'email' => $row['email'],\n        ]);\n    }\n\n    public function rules(): array\n    {\n        return [\n            '*.name' => ['required', 'string', 'max:255'],\n            '*.email' => ['required', 'email', 'distinct'],\n        ];\n    }\n\n    public function batchSize(): int\n    {\n        return 1000;\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\n$import = new UsersImport;\n\n$import->import($request->file('users'));\n\nif ($import->failures()->isNotEmpty()) {\n    // Return validation feedback to the user.\n}\n```\n\n## Mapped Cells Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse Maatwebsite\\Excel\\Concerns\\ToArray;\nuse Maatwebsite\\Excel\\Concerns\\WithMappedCells;\n\nclass InvoiceImport implements ToArray, WithMappedCells\n{\n    public function mapping(): array\n    {\n        return [\n            'invoice_number' => 'B2',\n            'customer_name' => 'B3',\n            'total' => 'E20',\n        ];\n    }\n\n    public function array(array $array): void\n    {\n        // Handle mapped values.\n    }\n}\n```\n\n## Testing With The Fake\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nExcel::fake();\n\n$this->get('/users/export')->assertOk();\n\nExcel::assertDownloaded('users.xlsx', function (UsersExport $export): bool {\n    return true;\n});\n```\n","resources/boost/skills/laravel-excel/SKILL.md":"---\nname: laravel-excel\ndescription: \"Use when building, modifying, testing, documenting, or debugging Laravel spreadsheet exports and imports with maatwebsite/excel. Activate for every Laravel Excel feature: facade APIs, export/import classes, all concerns, queues, batches, multiple sheets, conditional sheets, headings, mapping, validation, failures, errors, chunking, batch inserts, upserts, CSV settings, value binders, read filters, formulas, charts, drawings, styles, events, properties, Scout exports, view exports, mapped cells, macros, Artisan generators, config/excel.php, temporary files, cache, transactions, cell middleware, Excel::fake(), PhpSpreadsheet integration, or package maintenance.\"\nlicense: MIT\n---\n\n# Laravel Excel\n\nUse this skill when a Laravel task involves spreadsheet exports, imports, queued spreadsheet processing, CSV files, or package maintenance for `maatwebsite/excel`.\n\n## Read First\n\nUse `search-docs` when it is available for Laravel framework integration details. For package-specific behavior in this repository, inspect:\n\n- `src/Excel.php`\n- `src/Exporter.php`\n- `src/Importer.php`\n- `src/Concerns/`\n- `src/Fakes/ExcelFake.php`\n- `config/excel.php`\n- `tests/Concerns/`\n- `tests/ExcelFakeTest.php`\n- `../../examples/exports-imports.md`\n- `../../references/package.md`\n\nIf the user asks for complete coverage, \"all features\", package docs, package skills, or a missing-feature audit, read `../../references/package.md` first and use it as the checklist.\n\n## Working Rules\n\n- Keep controllers thin. Put spreadsheet behavior in dedicated export/import classes.\n- Use package concerns to declare behavior instead of custom imperative spreadsheet code.\n- Before claiming feature completeness, compare the output against `../../references/package.md`.\n- Use `Exportable` on export classes when the export should call `download()`, `store()`, `queue()`, or `raw()` directly.\n- Use `Importable` on import classes when the import should call `import()`, `queue()`, `toArray()`, or `toCollection()` directly.\n- Prefer `FromQuery` for large exports so the package can chunk records efficiently.\n- Prefer `WithChunkReading` plus `WithBatchInserts` for large `ToModel` imports.\n- Add Laravel's `Illuminate\\Contracts\\Queue\\ShouldQueue` to exports/imports that may exceed request time limits.\n- Use `WithMultipleSheets` for workbooks with multiple worksheets, and keep each sheet as its own export/import object.\n- Use `WithHeadingRow` when import files have user-facing headers; validate using heading keys instead of numeric indexes.\n- Use `WithValidation`, `SkipsOnFailure`, `SkipsFailures`, `SkipsOnError`, and `SkipsErrors` deliberately when importing untrusted user files.\n- Use `WithCustomCsvSettings` for delimiter, enclosure, input encoding, or BOM-sensitive CSV work.\n- Use PhpSpreadsheet concerns and events only when package concerns do not cover the required formatting or worksheet behavior.\n- Do not load large spreadsheets fully into memory unless the task explicitly needs complete workbook inspection.\n\n## Feature Coverage Checklist\n\nUse `../../references/package.md` for the complete matrix. It covers:\n\n- Facade APIs, object traits, contracts, file type constants, and extension detection.\n- Export sources, export formatting, events, styles, formulas, charts, drawings, properties, multiple sheets, conditional sheets, and CSV settings.\n- Import targets, heading rows, grouped headings, mapped cells, read filters, row/column limits, formulas, formatting, empty rows, unknown sheets, row numbers, and chunk offsets.\n- Validation, failures, errors, batch inserts, upserts, duplicate handling, relation persistence, queues, batches, and queue-without-chain behavior.\n- Console generators, published stubs/config, collection/query macros, cache, transactions, temporary files, remote temp disks, value binders, cell middleware, fakes, and package test locations.\n\n## Common API\n\nExports:\n\n- `Excel::download($export, 'file.xlsx')`\n- `Excel::store($export, 'exports/file.xlsx', 'disk')`\n- `Excel::queue($export, 'exports/file.xlsx', 'disk')`\n- `Excel::raw($export, Excel::XLSX)`\n\nImports:\n\n- `Excel::import($import, $filePath, $disk)`\n- `Excel::queueImport($import, $filePath, $disk)`\n- `Excel::toArray($import, $filePath, $disk)`\n- `Excel::toCollection($import, $filePath, $disk)`\n\nWriter and reader types are usually detected from the file extension. Pass explicit types such as `Excel::XLSX` or `Excel::CSV` when the extension is absent or ambiguous.\n\n## Export Pattern\n\nStart with the smallest concern set that matches the source:\n\n- `FromCollection` for an existing collection.\n- `FromArray` for simple arrays.\n- `FromGenerator` or `FromIterator` for streamed in-memory rows.\n- `FromQuery` for Eloquent or query builder datasets.\n- `FromView` when a Blade table is the clearest representation.\n\nAdd output concerns only when needed:\n\n- `WithHeadings` for header rows.\n- `WithMapping` for row transformation.\n- `WithColumnFormatting` for Excel number/date formats.\n- `ShouldAutoSize` or `WithColumnWidths` for layout.\n- `WithStyles`, `WithDefaultStyles`, `WithBackgroundColor`, or `WithEvents` for workbook styling.\n\n## Import Pattern\n\nChoose the import target deliberately:\n\n- `ToModel` to persist rows as Eloquent models.\n- `ToCollection` for application-level processing.\n- `ToArray` for lightweight read-only extraction.\n- `OnEachRow` for row-by-row custom handling.\n\nFor production user uploads, include validation and failure behavior instead of assuming perfect files. Use chunk reading for large files and avoid cross-row state that cannot survive queued chunk jobs.\n\n## Queues And Batches\n\n- If an export/import implements `ShouldQueue`, `store()` and `import()` may dispatch queued work.\n- Use `queue()` or `queueImport()` when queueing should be explicit at the call site.\n- Use `ShouldBatch` when the export/import should return a Laravel pending batch.\n- Use `ShouldQueueWithoutChain` only when queued import chunks should not be chained.\n- Keep queued export/import classes serializable. Avoid closures, open file handles, or non-serializable service instances on properties.\n\n## Testing\n\n- Use `Excel::fake()` when testing that a controller, command, job, or service requested the correct spreadsheet operation.\n- Assert intent with `assertDownloaded()`, `assertStored()`, `assertQueued()`, `assertImported()`, and `assertExportedInRaw()`.\n- Use callback assertions to verify the export/import object class and constructor state.\n- Generate and read real spreadsheet files only when testing cell values, multiple sheets, formatting, formulas, or PhpSpreadsheet compatibility.\n- In this package repository, follow existing PHPUnit tests under `tests/Concerns/`, `tests/ExcelFakeTest.php`, and `tests/Queued*Test.php`.\n\n## Maintenance Notes\n\n- Preserve Laravel auto-discovery entries in `composer.json` for the service provider and `Excel` facade alias.\n- Keep config changes in `config/excel.php` backward compatible unless the task explicitly targets a breaking release.\n- When changing a concern, update or add tests near the matching `tests/Concerns/*Test.php` file.\n- When changing fakes, update `tests/ExcelFakeTest.php`.\n- When changing queue behavior, update the matching queued import/export tests.\n","resources/boost/skills/references/package.md":"# Laravel Excel Feature Coverage Reference\n\nUse this file as the completeness checklist for `maatwebsite/excel`. If a user asks for \"all features\", compare the task against every section here.\n\n## Repository Shape\n\n- Package name: `maatwebsite/excel`\n- Primary namespace: `Maatwebsite\\Excel`\n- Service provider: `Maatwebsite\\Excel\\ExcelServiceProvider`\n- Facade: `Maatwebsite\\Excel\\Facades\\Excel`\n- Config file: `config/excel.php`\n- Export/import concerns: `src/Concerns/`\n- Console commands and stubs: `src/Console/`\n- Tests: `tests/`\n\n## Public Facade And Contracts\n\n- `Excel::download($export, $fileName, $writerType = null, $headers = [])`\n- `Excel::store($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::queue($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::raw($export, $writerType)`\n- `Excel::import($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::queueImport($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toArray($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toCollection($import, $filePath, $disk = null, $readerType = null)`\n- `Maatwebsite\\Excel\\Exporter`\n- `Maatwebsite\\Excel\\Importer`\n\n## File Types And Detection\n\n- `Excel::XLSX`\n- `Excel::CSV`\n- `Excel::TSV`\n- `Excel::ODS`\n- `Excel::XLS`\n- `Excel::SLK`\n- `Excel::XML`\n- `Excel::GNUMERIC`\n- `Excel::HTML`\n- `Excel::MPDF`\n- `Excel::DOMPDF`\n- `Excel::TCPDF`\n- Extension detection through `config('excel.extension_detector')`\n- `NoTypeDetectedException` when detection cannot resolve a writer/reader type\n\n## Export Sources\n\n- `FromArray`: rows from `array()`\n- `FromCollection`: rows from `collection()`\n- `FromGenerator`: rows from `generator()`\n- `FromIterator`: rows from `iterator()`\n- `FromQuery`: chunked query export from Eloquent, query builder, or relation\n- `FromScout`: export from Laravel Scout builder\n- `FromView`: export a Blade view/table\n\n## Export Behavior And Formatting\n\n- `Exportable`: object-level `download()`, `store()`, `queue()`, `raw()`, and responsable support\n- `WithHeadings`: prepend heading rows\n- `WithMapping`: transform each source row before writing\n- `WithColumnFormatting`: PhpSpreadsheet number/date formats\n- `WithColumnWidths`: fixed column widths\n- `ShouldAutoSize`: auto-size columns\n- `WithStyles`: style a worksheet directly\n- `WithDefaultStyles`: workbook default styles\n- `WithBackgroundColor`: workbook background color\n- `WithEvents`: register event listeners manually\n- `RegistersEventListeners`: auto-register static event listener methods\n- `WithProperties`: workbook document properties\n- `WithTitle`: worksheet title\n- `WithCustomStartCell`: start export output at a custom cell\n- `WithStrictNullComparison`: preserve empty string/null distinctions\n- `WithPreCalculateFormulas`: pre-calculate formulas before writing\n- `WithCharts`: attach PhpSpreadsheet charts\n- `WithDrawings`: attach PhpSpreadsheet drawings/images\n- `WithMultipleSheets`: build multi-sheet workbooks\n- `WithConditionalSheets`: expose optional sheet subsets through `onlySheets()`\n- `HasReferencesToOtherSheets`: mark formulas/references that cross sheets\n- `WithCustomCsvSettings`: per-export CSV settings\n- `MapsCsvSettings`: maps package CSV settings onto PhpSpreadsheet CSV writers/readers\n- `WithCustomChunkSize`: override export chunk size\n- `WithCustomQuerySize`: override query size estimation for queued query exports\n- `WithProgressBar`: write progress to console output\n- `WithColumnLimit`: limit exported columns through an end column\n\n## Import Targets\n\n- `ToModel`: convert each row to an Eloquent model, model array, or null\n- `ToCollection`: handle rows as a Laravel collection\n- `ToArray`: handle rows as arrays\n- `OnEachRow`: process a `Row` object one row at a time\n- `WithMappedCells`: map specific cells to named array keys\n\n## Import Reading Controls\n\n- `Importable`: object-level `import()`, `queue()`, `toArray()`, `toCollection()`, and console output support\n- `WithHeadingRow`: use a heading row for keys\n- `WithGroupedHeadingRow`: group duplicate heading names\n- `WithStartRow`: choose first data row\n- `WithLimit`: limit number of read rows\n- `WithColumnLimit`: limit read columns through an end column\n- `WithReadFilter`: use a PhpSpreadsheet read filter\n- `WithCalculatedFormulas`: read calculated formula results\n- `WithFormatData`: read formatted values\n- `WithCustomCsvSettings`: per-import CSV settings\n- `WithCustomValueBinder`: custom PhpSpreadsheet value binding\n- `SkipsEmptyRows`: skip empty rows\n- `SkipsUnknownSheets`: handle sheet names/indexes that do not exist\n- `RemembersRowNumber`: inspect current row number during import\n- `RemembersChunkOffset`: inspect current chunk offset during chunked import\n\n## Import Persistence, Validation, And Failures\n\n- `WithValidation`: row validation rules\n- `SkipsOnFailure`: handle validation failures without aborting\n- `SkipsFailures`: collect failures through `failures()`\n- `SkipsOnError`: handle thrown row errors without aborting\n- `SkipsErrors`: collect errors through `errors()`\n- `WithBatchInserts`: batch model inserts\n- `WithUpserts`: upsert by `uniqueBy()`\n- `WithUpsertColumns`: select columns updated during upsert\n- `WithSkipDuplicates`: skip duplicate rows during insert/upsert flows\n- `PersistRelations`: persist model relations from import rows\n- `ValidationException`\n- `Failure`\n- `RowSkippedException`\n\n## Queueing And Batching\n\n- Use `Illuminate\\Contracts\\Queue\\ShouldQueue` for queued exports/imports.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldBatch` when queue operations should return a pending batch.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldQueueWithoutChain` for queued imports without job chaining.\n- Queued exports use jobs such as `QueueExport`, `AppendDataToSheet`, `AppendQueryToSheet`, `AppendPaginatedToSheet`, `AppendViewToSheet`, `CloseSheet`, and `StoreQueuedExport`.\n- Queued imports use `QueueImport`, `ReadChunk`, `AfterImportJob`, `AfterBatch`, `AfterChunk`, and `ProxyFailures`.\n- `Jobs\\Middleware\\LocalizeJob` preserves locale preferences for queued work.\n- Remote temporary files support multi-server queue processing.\n\n## Events\n\n- `BeforeExport`\n- `BeforeWriting`\n- `BeforeSheet`\n- `AfterSheet`\n- `BeforeImport`\n- `AfterImport`\n- `AfterChunk`\n- `AfterBatch`\n- `ImportFailed`\n- Base event support through `Event` and `HasEventBus`\n\n## Console Commands And Stubs\n\n- `php artisan make:export ExportName`\n- `php artisan make:export ExportName --model=User`\n- `php artisan make:export ExportName --query`\n- `php artisan make:export ExportName --model=User --query`\n- `php artisan make:import ImportName`\n- `php artisan make:import ImportName --model=User`\n- Publish stubs with the package `stubs` publish tag.\n- Publish config with the package `config` publish tag.\n\n## Collection And Query Macros\n\n- `DownloadCollectionMixin`\n- `StoreCollectionMixin`\n- `DownloadQueryMacro`\n- `StoreQueryMacro`\n- `ImportMacro`\n- `ImportAsMacro`\n- `Collection::downloadExcel($fileName, $writerType = null, $withHeadings = false, $responseHeaders = [])`\n- `Collection::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::downloadExcel($fileName, $writerType = null, $withHeadings = false)`\n- `Builder::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::import($filename, $disk = null, $readerType = null)`\n- `Builder::importAs($filename, callable $mapping, $disk = null, $readerType = null)`\n\n## Configuration Surface\n\n- `exports.chunk_size`\n- `exports.pre_calculate_formulas`\n- `exports.strict_null_comparison`\n- `exports.csv.delimiter`\n- `exports.csv.enclosure`\n- `exports.csv.line_ending`\n- `exports.csv.use_bom`\n- `exports.csv.include_separator_line`\n- `exports.csv.excel_compatibility`\n- `exports.csv.output_encoding`\n- `exports.csv.test_auto_detect`\n- `exports.properties.*`\n- `imports.read_only`\n- `imports.ignore_empty`\n- `imports.heading_row.formatter`\n- `imports.csv.delimiter`\n- `imports.csv.enclosure`\n- `imports.csv.escape_character`\n- `imports.csv.contiguous`\n- `imports.csv.input_encoding`\n- `imports.properties.*`\n- `imports.cells.middleware`\n- `extension_detector`\n- `value_binder.default`\n- `cache.driver`\n- `cache.batch.memory_limit`\n- `cache.illuminate.store`\n- `cache.default_ttl`\n- `transactions.handler`\n- `transactions.db.connection`\n- `temporary_files.local_path`\n- `temporary_files.local_permissions`\n- `temporary_files.remote_disk`\n- `temporary_files.remote_prefix`\n- `temporary_files.force_resync_remote`\n\n## Cache, Transactions, Files, And Cell Middleware\n\n- Cache drivers: `memory`, `illuminate`, `batch`\n- Cache classes: `CacheManager`, `MemoryCache`, `BatchCache`\n- Transactions: `TransactionManager`, `DbTransactionHandler`, `NullTransactionHandler`\n- Temporary files: `TemporaryFileFactory`, `LocalTemporaryFile`, `RemoteTemporaryFile`\n- Filesystem disk wrapper: `Files\\Disk`, `Files\\Filesystem`\n- Cell middleware: `TrimCellValue`, `ConvertEmptyCellValuesToNull`, and custom `CellMiddleware`\n- Value binders: package default binder, PhpSpreadsheet string binder, PhpSpreadsheet advanced binder, custom `WithCustomValueBinder`\n\n## Testing And Fakes\n\n- `Excel::fake()`\n- `Excel::assertDownloaded($fileName, $callback = null)`\n- `Excel::assertStored($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueued($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueuedWithChain($chain)`\n- `Excel::assertExportedInRaw($className, $callback = null)`\n- `Excel::assertImported($filePath, $disk = null, $callback = null)`\n- `Excel::matchByRegex()`\n- `Excel::doNotMatchByRegex()`\n- Use real file reads through PhpSpreadsheet when cell values, sheets, formatting, formulas, drawings, or charts must be verified.\n\n## Maintenance Map\n\n- Concern changes: update matching `tests/Concerns/*Test.php`.\n- Facade/fake changes: update `tests/ExcelFakeTest.php`.\n- Queue changes: update `tests/QueuedExportTest.php`, `tests/QueuedImportTest.php`, `tests/QueuedQueryExportTest.php`, or `tests/QueuedViewExportTest.php`.\n- Macro changes: update `tests/Mixins/*Test.php`.\n- Validation changes: update `tests/Validators/RowValidatorTest.php`.\n- Cache changes: update `tests/Cache/BatchCacheTest.php`.\n- Service provider changes: update `tests/ExcelServiceProviderTest.php`.\n- PhpSpreadsheet compatibility changes: update `tests/PhpSpreadsheetV5CompatibilityTest.php`.\n"},"files":{"resources/boost/skills/examples/exports-imports.md":"# Laravel Excel Examples\n\nThese examples are representative patterns. For complete feature coverage, use `../references/package.md`.\n\n## Collection Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Collection;\nuse Maatwebsite\\Excel\\Concerns\\FromCollection;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass UsersExport implements FromCollection, WithHeadings, WithMapping\n{\n    public function collection(): Collection\n    {\n        return User::query()->latest()->get();\n    }\n\n    public function headings(): array\n    {\n        return ['Name', 'Email', 'Created At'];\n    }\n\n    public function map($user): array\n    {\n        return [\n            $user->name,\n            $user->email,\n            $user->created_at?->toDateTimeString(),\n        ];\n    }\n}\n```\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nreturn Excel::download(new UsersExport, 'users.xlsx');\n```\n\n## Queued Query Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\Order;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Maatwebsite\\Excel\\Concerns\\FromQuery;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomChunkSize;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass OrdersExport implements FromQuery, ShouldQueue, WithCustomChunkSize, WithHeadings, WithMapping\n{\n    public function query(): Builder\n    {\n        return Order::query()->with('customer')->whereNotNull('paid_at');\n    }\n\n    public function headings(): array\n    {\n        return ['Order', 'Customer', 'Total', 'Paid At'];\n    }\n\n    public function map($order): array\n    {\n        return [\n            $order->number,\n            $order->customer->name,\n            $order->total,\n            $order->paid_at?->toDateString(),\n        ];\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\nExcel::queue(new OrdersExport, 'exports/orders.xlsx', 's3');\n```\n\n## Multi-Sheet Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\WithMultipleSheets;\n\nclass ReportsWorkbookExport implements WithMultipleSheets\n{\n    public function sheets(): array\n    {\n        return [\n            'users' => new UsersExport,\n            'orders' => new OrdersExport,\n        ];\n    }\n}\n```\n\n## Styling, Events, And CSV Settings\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\FromArray;\nuse Maatwebsite\\Excel\\Concerns\\ShouldAutoSize;\nuse Maatwebsite\\Excel\\Concerns\\WithColumnFormatting;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomCsvSettings;\nuse Maatwebsite\\Excel\\Concerns\\WithEvents;\nuse Maatwebsite\\Excel\\Concerns\\WithStyles;\nuse Maatwebsite\\Excel\\Events\\AfterSheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RevenueExport implements FromArray, ShouldAutoSize, WithColumnFormatting, WithCustomCsvSettings, WithEvents, WithStyles\n{\n    public function array(): array\n    {\n        return [\n            ['Month', 'Revenue'],\n            ['January', 12345.67],\n        ];\n    }\n\n    public function columnFormats(): array\n    {\n        return [\n            'B' => NumberFormat::FORMAT_CURRENCY_USD_SIMPLE,\n        ];\n    }\n\n    public function getCsvSettings(): array\n    {\n        return [\n            'delimiter' => ';',\n            'use_bom' => true,\n        ];\n    }\n\n    public function registerEvents(): array\n    {\n        return [\n            AfterSheet::class => function (AfterSheet $event): void {\n                $event->sheet->freezePane('A2');\n            },\n        ];\n    }\n\n    public function styles(Worksheet $sheet): array\n    {\n        return [\n            1 => ['font' => ['bold' => true]],\n        ];\n    }\n}\n```\n\n## Validated Chunked Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse App\\Models\\User;\nuse Maatwebsite\\Excel\\Concerns\\Importable;\nuse Maatwebsite\\Excel\\Concerns\\SkipsFailures;\nuse Maatwebsite\\Excel\\Concerns\\SkipsOnFailure;\nuse Maatwebsite\\Excel\\Concerns\\ToModel;\nuse Maatwebsite\\Excel\\Concerns\\WithBatchInserts;\nuse Maatwebsite\\Excel\\Concerns\\WithChunkReading;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadingRow;\nuse Maatwebsite\\Excel\\Concerns\\WithValidation;\n\nclass UsersImport implements SkipsOnFailure, ToModel, WithBatchInserts, WithChunkReading, WithHeadingRow, WithValidation\n{\n    use Importable;\n    use SkipsFailures;\n\n    public function model(array $row): User\n    {\n        return new User([\n            'name' => $row['name'],\n            'email' => $row['email'],\n        ]);\n    }\n\n    public function rules(): array\n    {\n        return [\n            '*.name' => ['required', 'string', 'max:255'],\n            '*.email' => ['required', 'email', 'distinct'],\n        ];\n    }\n\n    public function batchSize(): int\n    {\n        return 1000;\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\n$import = new UsersImport;\n\n$import->import($request->file('users'));\n\nif ($import->failures()->isNotEmpty()) {\n    // Return validation feedback to the user.\n}\n```\n\n## Mapped Cells Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse Maatwebsite\\Excel\\Concerns\\ToArray;\nuse Maatwebsite\\Excel\\Concerns\\WithMappedCells;\n\nclass InvoiceImport implements ToArray, WithMappedCells\n{\n    public function mapping(): array\n    {\n        return [\n            'invoice_number' => 'B2',\n            'customer_name' => 'B3',\n            'total' => 'E20',\n        ];\n    }\n\n    public function array(array $array): void\n    {\n        // Handle mapped values.\n    }\n}\n```\n\n## Testing With The Fake\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nExcel::fake();\n\n$this->get('/users/export')->assertOk();\n\nExcel::assertDownloaded('users.xlsx', function (UsersExport $export): bool {\n    return true;\n});\n```\n","resources/boost/skills/laravel-excel/SKILL.md":"---\nname: laravel-excel\ndescription: \"Use when building, modifying, testing, documenting, or debugging Laravel spreadsheet exports and imports with maatwebsite/excel. Activate for every Laravel Excel feature: facade APIs, export/import classes, all concerns, queues, batches, multiple sheets, conditional sheets, headings, mapping, validation, failures, errors, chunking, batch inserts, upserts, CSV settings, value binders, read filters, formulas, charts, drawings, styles, events, properties, Scout exports, view exports, mapped cells, macros, Artisan generators, config/excel.php, temporary files, cache, transactions, cell middleware, Excel::fake(), PhpSpreadsheet integration, or package maintenance.\"\nlicense: MIT\n---\n\n# Laravel Excel\n\nUse this skill when a Laravel task involves spreadsheet exports, imports, queued spreadsheet processing, CSV files, or package maintenance for `maatwebsite/excel`.\n\n## Read First\n\nUse `search-docs` when it is available for Laravel framework integration details. For package-specific behavior in this repository, inspect:\n\n- `src/Excel.php`\n- `src/Exporter.php`\n- `src/Importer.php`\n- `src/Concerns/`\n- `src/Fakes/ExcelFake.php`\n- `config/excel.php`\n- `tests/Concerns/`\n- `tests/ExcelFakeTest.php`\n- `../../examples/exports-imports.md`\n- `../../references/package.md`\n\nIf the user asks for complete coverage, \"all features\", package docs, package skills, or a missing-feature audit, read `../../references/package.md` first and use it as the checklist.\n\n## Working Rules\n\n- Keep controllers thin. Put spreadsheet behavior in dedicated export/import classes.\n- Use package concerns to declare behavior instead of custom imperative spreadsheet code.\n- Before claiming feature completeness, compare the output against `../../references/package.md`.\n- Use `Exportable` on export classes when the export should call `download()`, `store()`, `queue()`, or `raw()` directly.\n- Use `Importable` on import classes when the import should call `import()`, `queue()`, `toArray()`, or `toCollection()` directly.\n- Prefer `FromQuery` for large exports so the package can chunk records efficiently.\n- Prefer `WithChunkReading` plus `WithBatchInserts` for large `ToModel` imports.\n- Add Laravel's `Illuminate\\Contracts\\Queue\\ShouldQueue` to exports/imports that may exceed request time limits.\n- Use `WithMultipleSheets` for workbooks with multiple worksheets, and keep each sheet as its own export/import object.\n- Use `WithHeadingRow` when import files have user-facing headers; validate using heading keys instead of numeric indexes.\n- Use `WithValidation`, `SkipsOnFailure`, `SkipsFailures`, `SkipsOnError`, and `SkipsErrors` deliberately when importing untrusted user files.\n- Use `WithCustomCsvSettings` for delimiter, enclosure, input encoding, or BOM-sensitive CSV work.\n- Use PhpSpreadsheet concerns and events only when package concerns do not cover the required formatting or worksheet behavior.\n- Do not load large spreadsheets fully into memory unless the task explicitly needs complete workbook inspection.\n\n## Feature Coverage Checklist\n\nUse `../../references/package.md` for the complete matrix. It covers:\n\n- Facade APIs, object traits, contracts, file type constants, and extension detection.\n- Export sources, export formatting, events, styles, formulas, charts, drawings, properties, multiple sheets, conditional sheets, and CSV settings.\n- Import targets, heading rows, grouped headings, mapped cells, read filters, row/column limits, formulas, formatting, empty rows, unknown sheets, row numbers, and chunk offsets.\n- Validation, failures, errors, batch inserts, upserts, duplicate handling, relation persistence, queues, batches, and queue-without-chain behavior.\n- Console generators, published stubs/config, collection/query macros, cache, transactions, temporary files, remote temp disks, value binders, cell middleware, fakes, and package test locations.\n\n## Common API\n\nExports:\n\n- `Excel::download($export, 'file.xlsx')`\n- `Excel::store($export, 'exports/file.xlsx', 'disk')`\n- `Excel::queue($export, 'exports/file.xlsx', 'disk')`\n- `Excel::raw($export, Excel::XLSX)`\n\nImports:\n\n- `Excel::import($import, $filePath, $disk)`\n- `Excel::queueImport($import, $filePath, $disk)`\n- `Excel::toArray($import, $filePath, $disk)`\n- `Excel::toCollection($import, $filePath, $disk)`\n\nWriter and reader types are usually detected from the file extension. Pass explicit types such as `Excel::XLSX` or `Excel::CSV` when the extension is absent or ambiguous.\n\n## Export Pattern\n\nStart with the smallest concern set that matches the source:\n\n- `FromCollection` for an existing collection.\n- `FromArray` for simple arrays.\n- `FromGenerator` or `FromIterator` for streamed in-memory rows.\n- `FromQuery` for Eloquent or query builder datasets.\n- `FromView` when a Blade table is the clearest representation.\n\nAdd output concerns only when needed:\n\n- `WithHeadings` for header rows.\n- `WithMapping` for row transformation.\n- `WithColumnFormatting` for Excel number/date formats.\n- `ShouldAutoSize` or `WithColumnWidths` for layout.\n- `WithStyles`, `WithDefaultStyles`, `WithBackgroundColor`, or `WithEvents` for workbook styling.\n\n## Import Pattern\n\nChoose the import target deliberately:\n\n- `ToModel` to persist rows as Eloquent models.\n- `ToCollection` for application-level processing.\n- `ToArray` for lightweight read-only extraction.\n- `OnEachRow` for row-by-row custom handling.\n\nFor production user uploads, include validation and failure behavior instead of assuming perfect files. Use chunk reading for large files and avoid cross-row state that cannot survive queued chunk jobs.\n\n## Queues And Batches\n\n- If an export/import implements `ShouldQueue`, `store()` and `import()` may dispatch queued work.\n- Use `queue()` or `queueImport()` when queueing should be explicit at the call site.\n- Use `ShouldBatch` when the export/import should return a Laravel pending batch.\n- Use `ShouldQueueWithoutChain` only when queued import chunks should not be chained.\n- Keep queued export/import classes serializable. Avoid closures, open file handles, or non-serializable service instances on properties.\n\n## Testing\n\n- Use `Excel::fake()` when testing that a controller, command, job, or service requested the correct spreadsheet operation.\n- Assert intent with `assertDownloaded()`, `assertStored()`, `assertQueued()`, `assertImported()`, and `assertExportedInRaw()`.\n- Use callback assertions to verify the export/import object class and constructor state.\n- Generate and read real spreadsheet files only when testing cell values, multiple sheets, formatting, formulas, or PhpSpreadsheet compatibility.\n- In this package repository, follow existing PHPUnit tests under `tests/Concerns/`, `tests/ExcelFakeTest.php`, and `tests/Queued*Test.php`.\n\n## Maintenance Notes\n\n- Preserve Laravel auto-discovery entries in `composer.json` for the service provider and `Excel` facade alias.\n- Keep config changes in `config/excel.php` backward compatible unless the task explicitly targets a breaking release.\n- When changing a concern, update or add tests near the matching `tests/Concerns/*Test.php` file.\n- When changing fakes, update `tests/ExcelFakeTest.php`.\n- When changing queue behavior, update the matching queued import/export tests.\n","resources/boost/skills/references/package.md":"# Laravel Excel Feature Coverage Reference\n\nUse this file as the completeness checklist for `maatwebsite/excel`. If a user asks for \"all features\", compare the task against every section here.\n\n## Repository Shape\n\n- Package name: `maatwebsite/excel`\n- Primary namespace: `Maatwebsite\\Excel`\n- Service provider: `Maatwebsite\\Excel\\ExcelServiceProvider`\n- Facade: `Maatwebsite\\Excel\\Facades\\Excel`\n- Config file: `config/excel.php`\n- Export/import concerns: `src/Concerns/`\n- Console commands and stubs: `src/Console/`\n- Tests: `tests/`\n\n## Public Facade And Contracts\n\n- `Excel::download($export, $fileName, $writerType = null, $headers = [])`\n- `Excel::store($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::queue($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::raw($export, $writerType)`\n- `Excel::import($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::queueImport($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toArray($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toCollection($import, $filePath, $disk = null, $readerType = null)`\n- `Maatwebsite\\Excel\\Exporter`\n- `Maatwebsite\\Excel\\Importer`\n\n## File Types And Detection\n\n- `Excel::XLSX`\n- `Excel::CSV`\n- `Excel::TSV`\n- `Excel::ODS`\n- `Excel::XLS`\n- `Excel::SLK`\n- `Excel::XML`\n- `Excel::GNUMERIC`\n- `Excel::HTML`\n- `Excel::MPDF`\n- `Excel::DOMPDF`\n- `Excel::TCPDF`\n- Extension detection through `config('excel.extension_detector')`\n- `NoTypeDetectedException` when detection cannot resolve a writer/reader type\n\n## Export Sources\n\n- `FromArray`: rows from `array()`\n- `FromCollection`: rows from `collection()`\n- `FromGenerator`: rows from `generator()`\n- `FromIterator`: rows from `iterator()`\n- `FromQuery`: chunked query export from Eloquent, query builder, or relation\n- `FromScout`: export from Laravel Scout builder\n- `FromView`: export a Blade view/table\n\n## Export Behavior And Formatting\n\n- `Exportable`: object-level `download()`, `store()`, `queue()`, `raw()`, and responsable support\n- `WithHeadings`: prepend heading rows\n- `WithMapping`: transform each source row before writing\n- `WithColumnFormatting`: PhpSpreadsheet number/date formats\n- `WithColumnWidths`: fixed column widths\n- `ShouldAutoSize`: auto-size columns\n- `WithStyles`: style a worksheet directly\n- `WithDefaultStyles`: workbook default styles\n- `WithBackgroundColor`: workbook background color\n- `WithEvents`: register event listeners manually\n- `RegistersEventListeners`: auto-register static event listener methods\n- `WithProperties`: workbook document properties\n- `WithTitle`: worksheet title\n- `WithCustomStartCell`: start export output at a custom cell\n- `WithStrictNullComparison`: preserve empty string/null distinctions\n- `WithPreCalculateFormulas`: pre-calculate formulas before writing\n- `WithCharts`: attach PhpSpreadsheet charts\n- `WithDrawings`: attach PhpSpreadsheet drawings/images\n- `WithMultipleSheets`: build multi-sheet workbooks\n- `WithConditionalSheets`: expose optional sheet subsets through `onlySheets()`\n- `HasReferencesToOtherSheets`: mark formulas/references that cross sheets\n- `WithCustomCsvSettings`: per-export CSV settings\n- `MapsCsvSettings`: maps package CSV settings onto PhpSpreadsheet CSV writers/readers\n- `WithCustomChunkSize`: override export chunk size\n- `WithCustomQuerySize`: override query size estimation for queued query exports\n- `WithProgressBar`: write progress to console output\n- `WithColumnLimit`: limit exported columns through an end column\n\n## Import Targets\n\n- `ToModel`: convert each row to an Eloquent model, model array, or null\n- `ToCollection`: handle rows as a Laravel collection\n- `ToArray`: handle rows as arrays\n- `OnEachRow`: process a `Row` object one row at a time\n- `WithMappedCells`: map specific cells to named array keys\n\n## Import Reading Controls\n\n- `Importable`: object-level `import()`, `queue()`, `toArray()`, `toCollection()`, and console output support\n- `WithHeadingRow`: use a heading row for keys\n- `WithGroupedHeadingRow`: group duplicate heading names\n- `WithStartRow`: choose first data row\n- `WithLimit`: limit number of read rows\n- `WithColumnLimit`: limit read columns through an end column\n- `WithReadFilter`: use a PhpSpreadsheet read filter\n- `WithCalculatedFormulas`: read calculated formula results\n- `WithFormatData`: read formatted values\n- `WithCustomCsvSettings`: per-import CSV settings\n- `WithCustomValueBinder`: custom PhpSpreadsheet value binding\n- `SkipsEmptyRows`: skip empty rows\n- `SkipsUnknownSheets`: handle sheet names/indexes that do not exist\n- `RemembersRowNumber`: inspect current row number during import\n- `RemembersChunkOffset`: inspect current chunk offset during chunked import\n\n## Import Persistence, Validation, And Failures\n\n- `WithValidation`: row validation rules\n- `SkipsOnFailure`: handle validation failures without aborting\n- `SkipsFailures`: collect failures through `failures()`\n- `SkipsOnError`: handle thrown row errors without aborting\n- `SkipsErrors`: collect errors through `errors()`\n- `WithBatchInserts`: batch model inserts\n- `WithUpserts`: upsert by `uniqueBy()`\n- `WithUpsertColumns`: select columns updated during upsert\n- `WithSkipDuplicates`: skip duplicate rows during insert/upsert flows\n- `PersistRelations`: persist model relations from import rows\n- `ValidationException`\n- `Failure`\n- `RowSkippedException`\n\n## Queueing And Batching\n\n- Use `Illuminate\\Contracts\\Queue\\ShouldQueue` for queued exports/imports.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldBatch` when queue operations should return a pending batch.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldQueueWithoutChain` for queued imports without job chaining.\n- Queued exports use jobs such as `QueueExport`, `AppendDataToSheet`, `AppendQueryToSheet`, `AppendPaginatedToSheet`, `AppendViewToSheet`, `CloseSheet`, and `StoreQueuedExport`.\n- Queued imports use `QueueImport`, `ReadChunk`, `AfterImportJob`, `AfterBatch`, `AfterChunk`, and `ProxyFailures`.\n- `Jobs\\Middleware\\LocalizeJob` preserves locale preferences for queued work.\n- Remote temporary files support multi-server queue processing.\n\n## Events\n\n- `BeforeExport`\n- `BeforeWriting`\n- `BeforeSheet`\n- `AfterSheet`\n- `BeforeImport`\n- `AfterImport`\n- `AfterChunk`\n- `AfterBatch`\n- `ImportFailed`\n- Base event support through `Event` and `HasEventBus`\n\n## Console Commands And Stubs\n\n- `php artisan make:export ExportName`\n- `php artisan make:export ExportName --model=User`\n- `php artisan make:export ExportName --query`\n- `php artisan make:export ExportName --model=User --query`\n- `php artisan make:import ImportName`\n- `php artisan make:import ImportName --model=User`\n- Publish stubs with the package `stubs` publish tag.\n- Publish config with the package `config` publish tag.\n\n## Collection And Query Macros\n\n- `DownloadCollectionMixin`\n- `StoreCollectionMixin`\n- `DownloadQueryMacro`\n- `StoreQueryMacro`\n- `ImportMacro`\n- `ImportAsMacro`\n- `Collection::downloadExcel($fileName, $writerType = null, $withHeadings = false, $responseHeaders = [])`\n- `Collection::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::downloadExcel($fileName, $writerType = null, $withHeadings = false)`\n- `Builder::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::import($filename, $disk = null, $readerType = null)`\n- `Builder::importAs($filename, callable $mapping, $disk = null, $readerType = null)`\n\n## Configuration Surface\n\n- `exports.chunk_size`\n- `exports.pre_calculate_formulas`\n- `exports.strict_null_comparison`\n- `exports.csv.delimiter`\n- `exports.csv.enclosure`\n- `exports.csv.line_ending`\n- `exports.csv.use_bom`\n- `exports.csv.include_separator_line`\n- `exports.csv.excel_compatibility`\n- `exports.csv.output_encoding`\n- `exports.csv.test_auto_detect`\n- `exports.properties.*`\n- `imports.read_only`\n- `imports.ignore_empty`\n- `imports.heading_row.formatter`\n- `imports.csv.delimiter`\n- `imports.csv.enclosure`\n- `imports.csv.escape_character`\n- `imports.csv.contiguous`\n- `imports.csv.input_encoding`\n- `imports.properties.*`\n- `imports.cells.middleware`\n- `extension_detector`\n- `value_binder.default`\n- `cache.driver`\n- `cache.batch.memory_limit`\n- `cache.illuminate.store`\n- `cache.default_ttl`\n- `transactions.handler`\n- `transactions.db.connection`\n- `temporary_files.local_path`\n- `temporary_files.local_permissions`\n- `temporary_files.remote_disk`\n- `temporary_files.remote_prefix`\n- `temporary_files.force_resync_remote`\n\n## Cache, Transactions, Files, And Cell Middleware\n\n- Cache drivers: `memory`, `illuminate`, `batch`\n- Cache classes: `CacheManager`, `MemoryCache`, `BatchCache`\n- Transactions: `TransactionManager`, `DbTransactionHandler`, `NullTransactionHandler`\n- Temporary files: `TemporaryFileFactory`, `LocalTemporaryFile`, `RemoteTemporaryFile`\n- Filesystem disk wrapper: `Files\\Disk`, `Files\\Filesystem`\n- Cell middleware: `TrimCellValue`, `ConvertEmptyCellValuesToNull`, and custom `CellMiddleware`\n- Value binders: package default binder, PhpSpreadsheet string binder, PhpSpreadsheet advanced binder, custom `WithCustomValueBinder`\n\n## Testing And Fakes\n\n- `Excel::fake()`\n- `Excel::assertDownloaded($fileName, $callback = null)`\n- `Excel::assertStored($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueued($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueuedWithChain($chain)`\n- `Excel::assertExportedInRaw($className, $callback = null)`\n- `Excel::assertImported($filePath, $disk = null, $callback = null)`\n- `Excel::matchByRegex()`\n- `Excel::doNotMatchByRegex()`\n- Use real file reads through PhpSpreadsheet when cell values, sheets, formatting, formulas, drawings, or charts must be verified.\n\n## Maintenance Map\n\n- Concern changes: update matching `tests/Concerns/*Test.php`.\n- Facade/fake changes: update `tests/ExcelFakeTest.php`.\n- Queue changes: update `tests/QueuedExportTest.php`, `tests/QueuedImportTest.php`, `tests/QueuedQueryExportTest.php`, or `tests/QueuedViewExportTest.php`.\n- Macro changes: update `tests/Mixins/*Test.php`.\n- Validation changes: update `tests/Validators/RowValidatorTest.php`.\n- Cache changes: update `tests/Cache/BatchCacheTest.php`.\n- Service provider changes: update `tests/ExcelServiceProviderTest.php`.\n- PhpSpreadsheet compatibility changes: update `tests/PhpSpreadsheetV5CompatibilityTest.php`.\n"},"items":[{"name":"exports-imports.md","path":"resources/boost/skills/examples/exports-imports.md","rawUrl":"https://raw.githubusercontent.com/SpartnerNL/Laravel-Excel/HEAD/resources/boost/skills/examples/exports-imports.md","title":"Examples Skill","category":"anthropic-skill","format":"markdown","content":"# Laravel Excel Examples\n\nThese examples are representative patterns. For complete feature coverage, use `../references/package.md`.\n\n## Collection Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Collection;\nuse Maatwebsite\\Excel\\Concerns\\FromCollection;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass UsersExport implements FromCollection, WithHeadings, WithMapping\n{\n    public function collection(): Collection\n    {\n        return User::query()->latest()->get();\n    }\n\n    public function headings(): array\n    {\n        return ['Name', 'Email', 'Created At'];\n    }\n\n    public function map($user): array\n    {\n        return [\n            $user->name,\n            $user->email,\n            $user->created_at?->toDateTimeString(),\n        ];\n    }\n}\n```\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nreturn Excel::download(new UsersExport, 'users.xlsx');\n```\n\n## Queued Query Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\Order;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Maatwebsite\\Excel\\Concerns\\FromQuery;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomChunkSize;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass OrdersExport implements FromQuery, ShouldQueue, WithCustomChunkSize, WithHeadings, WithMapping\n{\n    public function query(): Builder\n    {\n        return Order::query()->with('customer')->whereNotNull('paid_at');\n    }\n\n    public function headings(): array\n    {\n        return ['Order', 'Customer', 'Total', 'Paid At'];\n    }\n\n    public function map($order): array\n    {\n        return [\n            $order->number,\n            $order->customer->name,\n            $order->total,\n            $order->paid_at?->toDateString(),\n        ];\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\nExcel::queue(new OrdersExport, 'exports/orders.xlsx', 's3');\n```\n\n## Multi-Sheet Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\WithMultipleSheets;\n\nclass ReportsWorkbookExport implements WithMultipleSheets\n{\n    public function sheets(): array\n    {\n        return [\n            'users' => new UsersExport,\n            'orders' => new OrdersExport,\n        ];\n    }\n}\n```\n\n## Styling, Events, And CSV Settings\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\FromArray;\nuse Maatwebsite\\Excel\\Concerns\\ShouldAutoSize;\nuse Maatwebsite\\Excel\\Concerns\\WithColumnFormatting;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomCsvSettings;\nuse Maatwebsite\\Excel\\Concerns\\WithEvents;\nuse Maatwebsite\\Excel\\Concerns\\WithStyles;\nuse Maatwebsite\\Excel\\Events\\AfterSheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RevenueExport implements FromArray, ShouldAutoSize, WithColumnFormatting, WithCustomCsvSettings, WithEvents, WithStyles\n{\n    public function array(): array\n    {\n        return [\n            ['Month', 'Revenue'],\n            ['January', 12345.67],\n        ];\n    }\n\n    public function columnFormats(): array\n    {\n        return [\n            'B' => NumberFormat::FORMAT_CURRENCY_USD_SIMPLE,\n        ];\n    }\n\n    public function getCsvSettings(): array\n    {\n        return [\n            'delimiter' => ';',\n            'use_bom' => true,\n        ];\n    }\n\n    public function registerEvents(): array\n    {\n        return [\n            AfterSheet::class => function (AfterSheet $event): void {\n                $event->sheet->freezePane('A2');\n            },\n        ];\n    }\n\n    public function styles(Worksheet $sheet): array\n    {\n        return [\n            1 => ['font' => ['bold' => true]],\n        ];\n    }\n}\n```\n\n## Validated Chunked Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse App\\Models\\User;\nuse Maatwebsite\\Excel\\Concerns\\Importable;\nuse Maatwebsite\\Excel\\Concerns\\SkipsFailures;\nuse Maatwebsite\\Excel\\Concerns\\SkipsOnFailure;\nuse Maatwebsite\\Excel\\Concerns\\ToModel;\nuse Maatwebsite\\Excel\\Concerns\\WithBatchInserts;\nuse Maatwebsite\\Excel\\Concerns\\WithChunkReading;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadingRow;\nuse Maatwebsite\\Excel\\Concerns\\WithValidation;\n\nclass UsersImport implements SkipsOnFailure, ToModel, WithBatchInserts, WithChunkReading, WithHeadingRow, WithValidation\n{\n    use Importable;\n    use SkipsFailures;\n\n    public function model(array $row): User\n    {\n        return new User([\n            'name' => $row['name'],\n            'email' => $row['email'],\n        ]);\n    }\n\n    public function rules(): array\n    {\n        return [\n            '*.name' => ['required', 'string', 'max:255'],\n            '*.email' => ['required', 'email', 'distinct'],\n        ];\n    }\n\n    public function batchSize(): int\n    {\n        return 1000;\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\n$import = new UsersImport;\n\n$import->import($request->file('users'));\n\nif ($import->failures()->isNotEmpty()) {\n    // Return validation feedback to the user.\n}\n```\n\n## Mapped Cells Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse Maatwebsite\\Excel\\Concerns\\ToArray;\nuse Maatwebsite\\Excel\\Concerns\\WithMappedCells;\n\nclass InvoiceImport implements ToArray, WithMappedCells\n{\n    public function mapping(): array\n    {\n        return [\n            'invoice_number' => 'B2',\n            'customer_name' => 'B3',\n            'total' => 'E20',\n        ];\n    }\n\n    public function array(array $array): void\n    {\n        // Handle mapped values.\n    }\n}\n```\n\n## Testing With The Fake\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nExcel::fake();\n\n$this->get('/users/export')->assertOk();\n\nExcel::assertDownloaded('users.xlsx', function (UsersExport $export): bool {\n    return true;\n});\n```\n","isInternal":false,"tokens":1441,"sizeBytes":5870},{"name":"SKILL.md","path":"resources/boost/skills/laravel-excel/SKILL.md","rawUrl":"https://raw.githubusercontent.com/SpartnerNL/Laravel-Excel/HEAD/resources/boost/skills/laravel-excel/SKILL.md","title":"laravel-excel","category":"anthropic-skill","format":"markdown","content":"---\nname: laravel-excel\ndescription: \"Use when building, modifying, testing, documenting, or debugging Laravel spreadsheet exports and imports with maatwebsite/excel. Activate for every Laravel Excel feature: facade APIs, export/import classes, all concerns, queues, batches, multiple sheets, conditional sheets, headings, mapping, validation, failures, errors, chunking, batch inserts, upserts, CSV settings, value binders, read filters, formulas, charts, drawings, styles, events, properties, Scout exports, view exports, mapped cells, macros, Artisan generators, config/excel.php, temporary files, cache, transactions, cell middleware, Excel::fake(), PhpSpreadsheet integration, or package maintenance.\"\nlicense: MIT\n---\n\n# Laravel Excel\n\nUse this skill when a Laravel task involves spreadsheet exports, imports, queued spreadsheet processing, CSV files, or package maintenance for `maatwebsite/excel`.\n\n## Read First\n\nUse `search-docs` when it is available for Laravel framework integration details. For package-specific behavior in this repository, inspect:\n\n- `src/Excel.php`\n- `src/Exporter.php`\n- `src/Importer.php`\n- `src/Concerns/`\n- `src/Fakes/ExcelFake.php`\n- `config/excel.php`\n- `tests/Concerns/`\n- `tests/ExcelFakeTest.php`\n- `../../examples/exports-imports.md`\n- `../../references/package.md`\n\nIf the user asks for complete coverage, \"all features\", package docs, package skills, or a missing-feature audit, read `../../references/package.md` first and use it as the checklist.\n\n## Working Rules\n\n- Keep controllers thin. Put spreadsheet behavior in dedicated export/import classes.\n- Use package concerns to declare behavior instead of custom imperative spreadsheet code.\n- Before claiming feature completeness, compare the output against `../../references/package.md`.\n- Use `Exportable` on export classes when the export should call `download()`, `store()`, `queue()`, or `raw()` directly.\n- Use `Importable` on import classes when the import should call `import()`, `queue()`, `toArray()`, or `toCollection()` directly.\n- Prefer `FromQuery` for large exports so the package can chunk records efficiently.\n- Prefer `WithChunkReading` plus `WithBatchInserts` for large `ToModel` imports.\n- Add Laravel's `Illuminate\\Contracts\\Queue\\ShouldQueue` to exports/imports that may exceed request time limits.\n- Use `WithMultipleSheets` for workbooks with multiple worksheets, and keep each sheet as its own export/import object.\n- Use `WithHeadingRow` when import files have user-facing headers; validate using heading keys instead of numeric indexes.\n- Use `WithValidation`, `SkipsOnFailure`, `SkipsFailures`, `SkipsOnError`, and `SkipsErrors` deliberately when importing untrusted user files.\n- Use `WithCustomCsvSettings` for delimiter, enclosure, input encoding, or BOM-sensitive CSV work.\n- Use PhpSpreadsheet concerns and events only when package concerns do not cover the required formatting or worksheet behavior.\n- Do not load large spreadsheets fully into memory unless the task explicitly needs complete workbook inspection.\n\n## Feature Coverage Checklist\n\nUse `../../references/package.md` for the complete matrix. It covers:\n\n- Facade APIs, object traits, contracts, file type constants, and extension detection.\n- Export sources, export formatting, events, styles, formulas, charts, drawings, properties, multiple sheets, conditional sheets, and CSV settings.\n- Import targets, heading rows, grouped headings, mapped cells, read filters, row/column limits, formulas, formatting, empty rows, unknown sheets, row numbers, and chunk offsets.\n- Validation, failures, errors, batch inserts, upserts, duplicate handling, relation persistence, queues, batches, and queue-without-chain behavior.\n- Console generators, published stubs/config, collection/query macros, cache, transactions, temporary files, remote temp disks, value binders, cell middleware, fakes, and package test locations.\n\n## Common API\n\nExports:\n\n- `Excel::download($export, 'file.xlsx')`\n- `Excel::store($export, 'exports/file.xlsx', 'disk')`\n- `Excel::queue($export, 'exports/file.xlsx', 'disk')`\n- `Excel::raw($export, Excel::XLSX)`\n\nImports:\n\n- `Excel::import($import, $filePath, $disk)`\n- `Excel::queueImport($import, $filePath, $disk)`\n- `Excel::toArray($import, $filePath, $disk)`\n- `Excel::toCollection($import, $filePath, $disk)`\n\nWriter and reader types are usually detected from the file extension. Pass explicit types such as `Excel::XLSX` or `Excel::CSV` when the extension is absent or ambiguous.\n\n## Export Pattern\n\nStart with the smallest concern set that matches the source:\n\n- `FromCollection` for an existing collection.\n- `FromArray` for simple arrays.\n- `FromGenerator` or `FromIterator` for streamed in-memory rows.\n- `FromQuery` for Eloquent or query builder datasets.\n- `FromView` when a Blade table is the clearest representation.\n\nAdd output concerns only when needed:\n\n- `WithHeadings` for header rows.\n- `WithMapping` for row transformation.\n- `WithColumnFormatting` for Excel number/date formats.\n- `ShouldAutoSize` or `WithColumnWidths` for layout.\n- `WithStyles`, `WithDefaultStyles`, `WithBackgroundColor`, or `WithEvents` for workbook styling.\n\n## Import Pattern\n\nChoose the import target deliberately:\n\n- `ToModel` to persist rows as Eloquent models.\n- `ToCollection` for application-level processing.\n- `ToArray` for lightweight read-only extraction.\n- `OnEachRow` for row-by-row custom handling.\n\nFor production user uploads, include validation and failure behavior instead of assuming perfect files. Use chunk reading for large files and avoid cross-row state that cannot survive queued chunk jobs.\n\n## Queues And Batches\n\n- If an export/import implements `ShouldQueue`, `store()` and `import()` may dispatch queued work.\n- Use `queue()` or `queueImport()` when queueing should be explicit at the call site.\n- Use `ShouldBatch` when the export/import should return a Laravel pending batch.\n- Use `ShouldQueueWithoutChain` only when queued import chunks should not be chained.\n- Keep queued export/import classes serializable. Avoid closures, open file handles, or non-serializable service instances on properties.\n\n## Testing\n\n- Use `Excel::fake()` when testing that a controller, command, job, or service requested the correct spreadsheet operation.\n- Assert intent with `assertDownloaded()`, `assertStored()`, `assertQueued()`, `assertImported()`, and `assertExportedInRaw()`.\n- Use callback assertions to verify the export/import object class and constructor state.\n- Generate and read real spreadsheet files only when testing cell values, multiple sheets, formatting, formulas, or PhpSpreadsheet compatibility.\n- In this package repository, follow existing PHPUnit tests under `tests/Concerns/`, `tests/ExcelFakeTest.php`, and `tests/Queued*Test.php`.\n\n## Maintenance Notes\n\n- Preserve Laravel auto-discovery entries in `composer.json` for the service provider and `Excel` facade alias.\n- Keep config changes in `config/excel.php` backward compatible unless the task explicitly targets a breaking release.\n- When changing a concern, update or add tests near the matching `tests/Concerns/*Test.php` file.\n- When changing fakes, update `tests/ExcelFakeTest.php`.\n- When changing queue behavior, update the matching queued import/export tests.\n","frontmatter":{"name":"laravel-excel","description":"Use when building, modifying, testing, documenting, or debugging Laravel spreadsheet exports and imports with maatwebsite/excel. Activate for every Laravel Excel feature: facade APIs, export/import classes, all concerns, queues, batches, multiple sheets, conditional sheets, headings, mapping, validation, failures, errors, chunking, batch inserts, upserts, CSV settings, value binders, read filters, formulas, charts, drawings, styles, events, properties, Scout exports, view exports, mapped cells, macros, Artisan generators, config/excel.php, temporary files, cache, transactions, cell middleware, Excel::fake(), PhpSpreadsheet integration, or package maintenance.","license":"MIT"},"isInternal":false,"tokens":1600,"sizeBytes":7268},{"name":"package.md","path":"resources/boost/skills/references/package.md","rawUrl":"https://raw.githubusercontent.com/SpartnerNL/Laravel-Excel/HEAD/resources/boost/skills/references/package.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Laravel Excel Feature Coverage Reference\n\nUse this file as the completeness checklist for `maatwebsite/excel`. If a user asks for \"all features\", compare the task against every section here.\n\n## Repository Shape\n\n- Package name: `maatwebsite/excel`\n- Primary namespace: `Maatwebsite\\Excel`\n- Service provider: `Maatwebsite\\Excel\\ExcelServiceProvider`\n- Facade: `Maatwebsite\\Excel\\Facades\\Excel`\n- Config file: `config/excel.php`\n- Export/import concerns: `src/Concerns/`\n- Console commands and stubs: `src/Console/`\n- Tests: `tests/`\n\n## Public Facade And Contracts\n\n- `Excel::download($export, $fileName, $writerType = null, $headers = [])`\n- `Excel::store($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::queue($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::raw($export, $writerType)`\n- `Excel::import($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::queueImport($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toArray($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toCollection($import, $filePath, $disk = null, $readerType = null)`\n- `Maatwebsite\\Excel\\Exporter`\n- `Maatwebsite\\Excel\\Importer`\n\n## File Types And Detection\n\n- `Excel::XLSX`\n- `Excel::CSV`\n- `Excel::TSV`\n- `Excel::ODS`\n- `Excel::XLS`\n- `Excel::SLK`\n- `Excel::XML`\n- `Excel::GNUMERIC`\n- `Excel::HTML`\n- `Excel::MPDF`\n- `Excel::DOMPDF`\n- `Excel::TCPDF`\n- Extension detection through `config('excel.extension_detector')`\n- `NoTypeDetectedException` when detection cannot resolve a writer/reader type\n\n## Export Sources\n\n- `FromArray`: rows from `array()`\n- `FromCollection`: rows from `collection()`\n- `FromGenerator`: rows from `generator()`\n- `FromIterator`: rows from `iterator()`\n- `FromQuery`: chunked query export from Eloquent, query builder, or relation\n- `FromScout`: export from Laravel Scout builder\n- `FromView`: export a Blade view/table\n\n## Export Behavior And Formatting\n\n- `Exportable`: object-level `download()`, `store()`, `queue()`, `raw()`, and responsable support\n- `WithHeadings`: prepend heading rows\n- `WithMapping`: transform each source row before writing\n- `WithColumnFormatting`: PhpSpreadsheet number/date formats\n- `WithColumnWidths`: fixed column widths\n- `ShouldAutoSize`: auto-size columns\n- `WithStyles`: style a worksheet directly\n- `WithDefaultStyles`: workbook default styles\n- `WithBackgroundColor`: workbook background color\n- `WithEvents`: register event listeners manually\n- `RegistersEventListeners`: auto-register static event listener methods\n- `WithProperties`: workbook document properties\n- `WithTitle`: worksheet title\n- `WithCustomStartCell`: start export output at a custom cell\n- `WithStrictNullComparison`: preserve empty string/null distinctions\n- `WithPreCalculateFormulas`: pre-calculate formulas before writing\n- `WithCharts`: attach PhpSpreadsheet charts\n- `WithDrawings`: attach PhpSpreadsheet drawings/images\n- `WithMultipleSheets`: build multi-sheet workbooks\n- `WithConditionalSheets`: expose optional sheet subsets through `onlySheets()`\n- `HasReferencesToOtherSheets`: mark formulas/references that cross sheets\n- `WithCustomCsvSettings`: per-export CSV settings\n- `MapsCsvSettings`: maps package CSV settings onto PhpSpreadsheet CSV writers/readers\n- `WithCustomChunkSize`: override export chunk size\n- `WithCustomQuerySize`: override query size estimation for queued query exports\n- `WithProgressBar`: write progress to console output\n- `WithColumnLimit`: limit exported columns through an end column\n\n## Import Targets\n\n- `ToModel`: convert each row to an Eloquent model, model array, or null\n- `ToCollection`: handle rows as a Laravel collection\n- `ToArray`: handle rows as arrays\n- `OnEachRow`: process a `Row` object one row at a time\n- `WithMappedCells`: map specific cells to named array keys\n\n## Import Reading Controls\n\n- `Importable`: object-level `import()`, `queue()`, `toArray()`, `toCollection()`, and console output support\n- `WithHeadingRow`: use a heading row for keys\n- `WithGroupedHeadingRow`: group duplicate heading names\n- `WithStartRow`: choose first data row\n- `WithLimit`: limit number of read rows\n- `WithColumnLimit`: limit read columns through an end column\n- `WithReadFilter`: use a PhpSpreadsheet read filter\n- `WithCalculatedFormulas`: read calculated formula results\n- `WithFormatData`: read formatted values\n- `WithCustomCsvSettings`: per-import CSV settings\n- `WithCustomValueBinder`: custom PhpSpreadsheet value binding\n- `SkipsEmptyRows`: skip empty rows\n- `SkipsUnknownSheets`: handle sheet names/indexes that do not exist\n- `RemembersRowNumber`: inspect current row number during import\n- `RemembersChunkOffset`: inspect current chunk offset during chunked import\n\n## Import Persistence, Validation, And Failures\n\n- `WithValidation`: row validation rules\n- `SkipsOnFailure`: handle validation failures without aborting\n- `SkipsFailures`: collect failures through `failures()`\n- `SkipsOnError`: handle thrown row errors without aborting\n- `SkipsErrors`: collect errors through `errors()`\n- `WithBatchInserts`: batch model inserts\n- `WithUpserts`: upsert by `uniqueBy()`\n- `WithUpsertColumns`: select columns updated during upsert\n- `WithSkipDuplicates`: skip duplicate rows during insert/upsert flows\n- `PersistRelations`: persist model relations from import rows\n- `ValidationException`\n- `Failure`\n- `RowSkippedException`\n\n## Queueing And Batching\n\n- Use `Illuminate\\Contracts\\Queue\\ShouldQueue` for queued exports/imports.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldBatch` when queue operations should return a pending batch.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldQueueWithoutChain` for queued imports without job chaining.\n- Queued exports use jobs such as `QueueExport`, `AppendDataToSheet`, `AppendQueryToSheet`, `AppendPaginatedToSheet`, `AppendViewToSheet`, `CloseSheet`, and `StoreQueuedExport`.\n- Queued imports use `QueueImport`, `ReadChunk`, `AfterImportJob`, `AfterBatch`, `AfterChunk`, and `ProxyFailures`.\n- `Jobs\\Middleware\\LocalizeJob` preserves locale preferences for queued work.\n- Remote temporary files support multi-server queue processing.\n\n## Events\n\n- `BeforeExport`\n- `BeforeWriting`\n- `BeforeSheet`\n- `AfterSheet`\n- `BeforeImport`\n- `AfterImport`\n- `AfterChunk`\n- `AfterBatch`\n- `ImportFailed`\n- Base event support through `Event` and `HasEventBus`\n\n## Console Commands And Stubs\n\n- `php artisan make:export ExportName`\n- `php artisan make:export ExportName --model=User`\n- `php artisan make:export ExportName --query`\n- `php artisan make:export ExportName --model=User --query`\n- `php artisan make:import ImportName`\n- `php artisan make:import ImportName --model=User`\n- Publish stubs with the package `stubs` publish tag.\n- Publish config with the package `config` publish tag.\n\n## Collection And Query Macros\n\n- `DownloadCollectionMixin`\n- `StoreCollectionMixin`\n- `DownloadQueryMacro`\n- `StoreQueryMacro`\n- `ImportMacro`\n- `ImportAsMacro`\n- `Collection::downloadExcel($fileName, $writerType = null, $withHeadings = false, $responseHeaders = [])`\n- `Collection::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::downloadExcel($fileName, $writerType = null, $withHeadings = false)`\n- `Builder::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::import($filename, $disk = null, $readerType = null)`\n- `Builder::importAs($filename, callable $mapping, $disk = null, $readerType = null)`\n\n## Configuration Surface\n\n- `exports.chunk_size`\n- `exports.pre_calculate_formulas`\n- `exports.strict_null_comparison`\n- `exports.csv.delimiter`\n- `exports.csv.enclosure`\n- `exports.csv.line_ending`\n- `exports.csv.use_bom`\n- `exports.csv.include_separator_line`\n- `exports.csv.excel_compatibility`\n- `exports.csv.output_encoding`\n- `exports.csv.test_auto_detect`\n- `exports.properties.*`\n- `imports.read_only`\n- `imports.ignore_empty`\n- `imports.heading_row.formatter`\n- `imports.csv.delimiter`\n- `imports.csv.enclosure`\n- `imports.csv.escape_character`\n- `imports.csv.contiguous`\n- `imports.csv.input_encoding`\n- `imports.properties.*`\n- `imports.cells.middleware`\n- `extension_detector`\n- `value_binder.default`\n- `cache.driver`\n- `cache.batch.memory_limit`\n- `cache.illuminate.store`\n- `cache.default_ttl`\n- `transactions.handler`\n- `transactions.db.connection`\n- `temporary_files.local_path`\n- `temporary_files.local_permissions`\n- `temporary_files.remote_disk`\n- `temporary_files.remote_prefix`\n- `temporary_files.force_resync_remote`\n\n## Cache, Transactions, Files, And Cell Middleware\n\n- Cache drivers: `memory`, `illuminate`, `batch`\n- Cache classes: `CacheManager`, `MemoryCache`, `BatchCache`\n- Transactions: `TransactionManager`, `DbTransactionHandler`, `NullTransactionHandler`\n- Temporary files: `TemporaryFileFactory`, `LocalTemporaryFile`, `RemoteTemporaryFile`\n- Filesystem disk wrapper: `Files\\Disk`, `Files\\Filesystem`\n- Cell middleware: `TrimCellValue`, `ConvertEmptyCellValuesToNull`, and custom `CellMiddleware`\n- Value binders: package default binder, PhpSpreadsheet string binder, PhpSpreadsheet advanced binder, custom `WithCustomValueBinder`\n\n## Testing And Fakes\n\n- `Excel::fake()`\n- `Excel::assertDownloaded($fileName, $callback = null)`\n- `Excel::assertStored($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueued($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueuedWithChain($chain)`\n- `Excel::assertExportedInRaw($className, $callback = null)`\n- `Excel::assertImported($filePath, $disk = null, $callback = null)`\n- `Excel::matchByRegex()`\n- `Excel::doNotMatchByRegex()`\n- Use real file reads through PhpSpreadsheet when cell values, sheets, formatting, formulas, drawings, or charts must be verified.\n\n## Maintenance Map\n\n- Concern changes: update matching `tests/Concerns/*Test.php`.\n- Facade/fake changes: update `tests/ExcelFakeTest.php`.\n- Queue changes: update `tests/QueuedExportTest.php`, `tests/QueuedImportTest.php`, `tests/QueuedQueryExportTest.php`, or `tests/QueuedViewExportTest.php`.\n- Macro changes: update `tests/Mixins/*Test.php`.\n- Validation changes: update `tests/Validators/RowValidatorTest.php`.\n- Cache changes: update `tests/Cache/BatchCacheTest.php`.\n- Service provider changes: update `tests/ExcelServiceProviderTest.php`.\n- PhpSpreadsheet compatibility changes: update `tests/PhpSpreadsheetV5CompatibilityTest.php`.\n","isInternal":false,"tokens":2601,"sizeBytes":10389}],"systemPromptSnippet":"<yakaai_skills repo=\"SpartnerNL/Laravel-Excel\">\n<!-- File: resources/boost/skills/examples/exports-imports.md (Tokens: ~1441 | Category: anthropic-skill) -->\n# Laravel Excel Examples\n\nThese examples are representative patterns. For complete feature coverage, use `../references/package.md`.\n\n## Collection Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Collection;\nuse Maatwebsite\\Excel\\Concerns\\FromCollection;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass UsersExport implements FromCollection, WithHeadings, WithMapping\n{\n    public function collection(): Collection\n    {\n        return User::query()->latest()->get();\n    }\n\n    public function headings(): array\n    {\n        return ['Name', 'Email', 'Created At'];\n    }\n\n    public function map($user): array\n    {\n        return [\n            $user->name,\n            $user->email,\n            $user->created_at?->toDateTimeString(),\n        ];\n    }\n}\n```\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nreturn Excel::download(new UsersExport, 'users.xlsx');\n```\n\n## Queued Query Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse App\\Models\\Order;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Maatwebsite\\Excel\\Concerns\\FromQuery;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomChunkSize;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadings;\nuse Maatwebsite\\Excel\\Concerns\\WithMapping;\n\nclass OrdersExport implements FromQuery, ShouldQueue, WithCustomChunkSize, WithHeadings, WithMapping\n{\n    public function query(): Builder\n    {\n        return Order::query()->with('customer')->whereNotNull('paid_at');\n    }\n\n    public function headings(): array\n    {\n        return ['Order', 'Customer', 'Total', 'Paid At'];\n    }\n\n    public function map($order): array\n    {\n        return [\n            $order->number,\n            $order->customer->name,\n            $order->total,\n            $order->paid_at?->toDateString(),\n        ];\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\nExcel::queue(new OrdersExport, 'exports/orders.xlsx', 's3');\n```\n\n## Multi-Sheet Export\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\WithMultipleSheets;\n\nclass ReportsWorkbookExport implements WithMultipleSheets\n{\n    public function sheets(): array\n    {\n        return [\n            'users' => new UsersExport,\n            'orders' => new OrdersExport,\n        ];\n    }\n}\n```\n\n## Styling, Events, And CSV Settings\n\n```php\n<?php\n\nnamespace App\\Exports;\n\nuse Maatwebsite\\Excel\\Concerns\\FromArray;\nuse Maatwebsite\\Excel\\Concerns\\ShouldAutoSize;\nuse Maatwebsite\\Excel\\Concerns\\WithColumnFormatting;\nuse Maatwebsite\\Excel\\Concerns\\WithCustomCsvSettings;\nuse Maatwebsite\\Excel\\Concerns\\WithEvents;\nuse Maatwebsite\\Excel\\Concerns\\WithStyles;\nuse Maatwebsite\\Excel\\Events\\AfterSheet;\nuse PhpOffice\\PhpSpreadsheet\\Style\\NumberFormat;\nuse PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet;\n\nclass RevenueExport implements FromArray, ShouldAutoSize, WithColumnFormatting, WithCustomCsvSettings, WithEvents, WithStyles\n{\n    public function array(): array\n    {\n        return [\n            ['Month', 'Revenue'],\n            ['January', 12345.67],\n        ];\n    }\n\n    public function columnFormats(): array\n    {\n        return [\n            'B' => NumberFormat::FORMAT_CURRENCY_USD_SIMPLE,\n        ];\n    }\n\n    public function getCsvSettings(): array\n    {\n        return [\n            'delimiter' => ';',\n            'use_bom' => true,\n        ];\n    }\n\n    public function registerEvents(): array\n    {\n        return [\n            AfterSheet::class => function (AfterSheet $event): void {\n                $event->sheet->freezePane('A2');\n            },\n        ];\n    }\n\n    public function styles(Worksheet $sheet): array\n    {\n        return [\n            1 => ['font' => ['bold' => true]],\n        ];\n    }\n}\n```\n\n## Validated Chunked Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse App\\Models\\User;\nuse Maatwebsite\\Excel\\Concerns\\Importable;\nuse Maatwebsite\\Excel\\Concerns\\SkipsFailures;\nuse Maatwebsite\\Excel\\Concerns\\SkipsOnFailure;\nuse Maatwebsite\\Excel\\Concerns\\ToModel;\nuse Maatwebsite\\Excel\\Concerns\\WithBatchInserts;\nuse Maatwebsite\\Excel\\Concerns\\WithChunkReading;\nuse Maatwebsite\\Excel\\Concerns\\WithHeadingRow;\nuse Maatwebsite\\Excel\\Concerns\\WithValidation;\n\nclass UsersImport implements SkipsOnFailure, ToModel, WithBatchInserts, WithChunkReading, WithHeadingRow, WithValidation\n{\n    use Importable;\n    use SkipsFailures;\n\n    public function model(array $row): User\n    {\n        return new User([\n            'name' => $row['name'],\n            'email' => $row['email'],\n        ]);\n    }\n\n    public function rules(): array\n    {\n        return [\n            '*.name' => ['required', 'string', 'max:255'],\n            '*.email' => ['required', 'email', 'distinct'],\n        ];\n    }\n\n    public function batchSize(): int\n    {\n        return 1000;\n    }\n\n    public function chunkSize(): int\n    {\n        return 1000;\n    }\n}\n```\n\n```php\n$import = new UsersImport;\n\n$import->import($request->file('users'));\n\nif ($import->failures()->isNotEmpty()) {\n    // Return validation feedback to the user.\n}\n```\n\n## Mapped Cells Import\n\n```php\n<?php\n\nnamespace App\\Imports;\n\nuse Maatwebsite\\Excel\\Concerns\\ToArray;\nuse Maatwebsite\\Excel\\Concerns\\WithMappedCells;\n\nclass InvoiceImport implements ToArray, WithMappedCells\n{\n    public function mapping(): array\n    {\n        return [\n            'invoice_number' => 'B2',\n            'customer_name' => 'B3',\n            'total' => 'E20',\n        ];\n    }\n\n    public function array(array $array): void\n    {\n        // Handle mapped values.\n    }\n}\n```\n\n## Testing With The Fake\n\n```php\nuse App\\Exports\\UsersExport;\nuse Maatwebsite\\Excel\\Facades\\Excel;\n\nExcel::fake();\n\n$this->get('/users/export')->assertOk();\n\nExcel::assertDownloaded('users.xlsx', function (UsersExport $export): bool {\n    return true;\n});\n```\n\n<!-- File: resources/boost/skills/laravel-excel/SKILL.md (Tokens: ~1600 | Category: anthropic-skill) -->\n---\nname: laravel-excel\ndescription: \"Use when building, modifying, testing, documenting, or debugging Laravel spreadsheet exports and imports with maatwebsite/excel. Activate for every Laravel Excel feature: facade APIs, export/import classes, all concerns, queues, batches, multiple sheets, conditional sheets, headings, mapping, validation, failures, errors, chunking, batch inserts, upserts, CSV settings, value binders, read filters, formulas, charts, drawings, styles, events, properties, Scout exports, view exports, mapped cells, macros, Artisan generators, config/excel.php, temporary files, cache, transactions, cell middleware, Excel::fake(), PhpSpreadsheet integration, or package maintenance.\"\nlicense: MIT\n---\n\n# Laravel Excel\n\nUse this skill when a Laravel task involves spreadsheet exports, imports, queued spreadsheet processing, CSV files, or package maintenance for `maatwebsite/excel`.\n\n## Read First\n\nUse `search-docs` when it is available for Laravel framework integration details. For package-specific behavior in this repository, inspect:\n\n- `src/Excel.php`\n- `src/Exporter.php`\n- `src/Importer.php`\n- `src/Concerns/`\n- `src/Fakes/ExcelFake.php`\n- `config/excel.php`\n- `tests/Concerns/`\n- `tests/ExcelFakeTest.php`\n- `../../examples/exports-imports.md`\n- `../../references/package.md`\n\nIf the user asks for complete coverage, \"all features\", package docs, package skills, or a missing-feature audit, read `../../references/package.md` first and use it as the checklist.\n\n## Working Rules\n\n- Keep controllers thin. Put spreadsheet behavior in dedicated export/import classes.\n- Use package concerns to declare behavior instead of custom imperative spreadsheet code.\n- Before claiming feature completeness, compare the output against `../../references/package.md`.\n- Use `Exportable` on export classes when the export should call `download()`, `store()`, `queue()`, or `raw()` directly.\n- Use `Importable` on import classes when the import should call `import()`, `queue()`, `toArray()`, or `toCollection()` directly.\n- Prefer `FromQuery` for large exports so the package can chunk records efficiently.\n- Prefer `WithChunkReading` plus `WithBatchInserts` for large `ToModel` imports.\n- Add Laravel's `Illuminate\\Contracts\\Queue\\ShouldQueue` to exports/imports that may exceed request time limits.\n- Use `WithMultipleSheets` for workbooks with multiple worksheets, and keep each sheet as its own export/import object.\n- Use `WithHeadingRow` when import files have user-facing headers; validate using heading keys instead of numeric indexes.\n- Use `WithValidation`, `SkipsOnFailure`, `SkipsFailures`, `SkipsOnError`, and `SkipsErrors` deliberately when importing untrusted user files.\n- Use `WithCustomCsvSettings` for delimiter, enclosure, input encoding, or BOM-sensitive CSV work.\n- Use PhpSpreadsheet concerns and events only when package concerns do not cover the required formatting or worksheet behavior.\n- Do not load large spreadsheets fully into memory unless the task explicitly needs complete workbook inspection.\n\n## Feature Coverage Checklist\n\nUse `../../references/package.md` for the complete matrix. It covers:\n\n- Facade APIs, object traits, contracts, file type constants, and extension detection.\n- Export sources, export formatting, events, styles, formulas, charts, drawings, properties, multiple sheets, conditional sheets, and CSV settings.\n- Import targets, heading rows, grouped headings, mapped cells, read filters, row/column limits, formulas, formatting, empty rows, unknown sheets, row numbers, and chunk offsets.\n- Validation, failures, errors, batch inserts, upserts, duplicate handling, relation persistence, queues, batches, and queue-without-chain behavior.\n- Console generators, published stubs/config, collection/query macros, cache, transactions, temporary files, remote temp disks, value binders, cell middleware, fakes, and package test locations.\n\n## Common API\n\nExports:\n\n- `Excel::download($export, 'file.xlsx')`\n- `Excel::store($export, 'exports/file.xlsx', 'disk')`\n- `Excel::queue($export, 'exports/file.xlsx', 'disk')`\n- `Excel::raw($export, Excel::XLSX)`\n\nImports:\n\n- `Excel::import($import, $filePath, $disk)`\n- `Excel::queueImport($import, $filePath, $disk)`\n- `Excel::toArray($import, $filePath, $disk)`\n- `Excel::toCollection($import, $filePath, $disk)`\n\nWriter and reader types are usually detected from the file extension. Pass explicit types such as `Excel::XLSX` or `Excel::CSV` when the extension is absent or ambiguous.\n\n## Export Pattern\n\nStart with the smallest concern set that matches the source:\n\n- `FromCollection` for an existing collection.\n- `FromArray` for simple arrays.\n- `FromGenerator` or `FromIterator` for streamed in-memory rows.\n- `FromQuery` for Eloquent or query builder datasets.\n- `FromView` when a Blade table is the clearest representation.\n\nAdd output concerns only when needed:\n\n- `WithHeadings` for header rows.\n- `WithMapping` for row transformation.\n- `WithColumnFormatting` for Excel number/date formats.\n- `ShouldAutoSize` or `WithColumnWidths` for layout.\n- `WithStyles`, `WithDefaultStyles`, `WithBackgroundColor`, or `WithEvents` for workbook styling.\n\n## Import Pattern\n\nChoose the import target deliberately:\n\n- `ToModel` to persist rows as Eloquent models.\n- `ToCollection` for application-level processing.\n- `ToArray` for lightweight read-only extraction.\n- `OnEachRow` for row-by-row custom handling.\n\nFor production user uploads, include validation and failure behavior instead of assuming perfect files. Use chunk reading for large files and avoid cross-row state that cannot survive queued chunk jobs.\n\n## Queues And Batches\n\n- If an export/import implements `ShouldQueue`, `store()` and `import()` may dispatch queued work.\n- Use `queue()` or `queueImport()` when queueing should be explicit at the call site.\n- Use `ShouldBatch` when the export/import should return a Laravel pending batch.\n- Use `ShouldQueueWithoutChain` only when queued import chunks should not be chained.\n- Keep queued export/import classes serializable. Avoid closures, open file handles, or non-serializable service instances on properties.\n\n## Testing\n\n- Use `Excel::fake()` when testing that a controller, command, job, or service requested the correct spreadsheet operation.\n- Assert intent with `assertDownloaded()`, `assertStored()`, `assertQueued()`, `assertImported()`, and `assertExportedInRaw()`.\n- Use callback assertions to verify the export/import object class and constructor state.\n- Generate and read real spreadsheet files only when testing cell values, multiple sheets, formatting, formulas, or PhpSpreadsheet compatibility.\n- In this package repository, follow existing PHPUnit tests under `tests/Concerns/`, `tests/ExcelFakeTest.php`, and `tests/Queued*Test.php`.\n\n## Maintenance Notes\n\n- Preserve Laravel auto-discovery entries in `composer.json` for the service provider and `Excel` facade alias.\n- Keep config changes in `config/excel.php` backward compatible unless the task explicitly targets a breaking release.\n- When changing a concern, update or add tests near the matching `tests/Concerns/*Test.php` file.\n- When changing fakes, update `tests/ExcelFakeTest.php`.\n- When changing queue behavior, update the matching queued import/export tests.\n\n<!-- File: resources/boost/skills/references/package.md (Tokens: ~2601 | Category: anthropic-skill) -->\n# Laravel Excel Feature Coverage Reference\n\nUse this file as the completeness checklist for `maatwebsite/excel`. If a user asks for \"all features\", compare the task against every section here.\n\n## Repository Shape\n\n- Package name: `maatwebsite/excel`\n- Primary namespace: `Maatwebsite\\Excel`\n- Service provider: `Maatwebsite\\Excel\\ExcelServiceProvider`\n- Facade: `Maatwebsite\\Excel\\Facades\\Excel`\n- Config file: `config/excel.php`\n- Export/import concerns: `src/Concerns/`\n- Console commands and stubs: `src/Console/`\n- Tests: `tests/`\n\n## Public Facade And Contracts\n\n- `Excel::download($export, $fileName, $writerType = null, $headers = [])`\n- `Excel::store($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::queue($export, $filePath, $disk = null, $writerType = null, $diskOptions = [])`\n- `Excel::raw($export, $writerType)`\n- `Excel::import($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::queueImport($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toArray($import, $filePath, $disk = null, $readerType = null)`\n- `Excel::toCollection($import, $filePath, $disk = null, $readerType = null)`\n- `Maatwebsite\\Excel\\Exporter`\n- `Maatwebsite\\Excel\\Importer`\n\n## File Types And Detection\n\n- `Excel::XLSX`\n- `Excel::CSV`\n- `Excel::TSV`\n- `Excel::ODS`\n- `Excel::XLS`\n- `Excel::SLK`\n- `Excel::XML`\n- `Excel::GNUMERIC`\n- `Excel::HTML`\n- `Excel::MPDF`\n- `Excel::DOMPDF`\n- `Excel::TCPDF`\n- Extension detection through `config('excel.extension_detector')`\n- `NoTypeDetectedException` when detection cannot resolve a writer/reader type\n\n## Export Sources\n\n- `FromArray`: rows from `array()`\n- `FromCollection`: rows from `collection()`\n- `FromGenerator`: rows from `generator()`\n- `FromIterator`: rows from `iterator()`\n- `FromQuery`: chunked query export from Eloquent, query builder, or relation\n- `FromScout`: export from Laravel Scout builder\n- `FromView`: export a Blade view/table\n\n## Export Behavior And Formatting\n\n- `Exportable`: object-level `download()`, `store()`, `queue()`, `raw()`, and responsable support\n- `WithHeadings`: prepend heading rows\n- `WithMapping`: transform each source row before writing\n- `WithColumnFormatting`: PhpSpreadsheet number/date formats\n- `WithColumnWidths`: fixed column widths\n- `ShouldAutoSize`: auto-size columns\n- `WithStyles`: style a worksheet directly\n- `WithDefaultStyles`: workbook default styles\n- `WithBackgroundColor`: workbook background color\n- `WithEvents`: register event listeners manually\n- `RegistersEventListeners`: auto-register static event listener methods\n- `WithProperties`: workbook document properties\n- `WithTitle`: worksheet title\n- `WithCustomStartCell`: start export output at a custom cell\n- `WithStrictNullComparison`: preserve empty string/null distinctions\n- `WithPreCalculateFormulas`: pre-calculate formulas before writing\n- `WithCharts`: attach PhpSpreadsheet charts\n- `WithDrawings`: attach PhpSpreadsheet drawings/images\n- `WithMultipleSheets`: build multi-sheet workbooks\n- `WithConditionalSheets`: expose optional sheet subsets through `onlySheets()`\n- `HasReferencesToOtherSheets`: mark formulas/references that cross sheets\n- `WithCustomCsvSettings`: per-export CSV settings\n- `MapsCsvSettings`: maps package CSV settings onto PhpSpreadsheet CSV writers/readers\n- `WithCustomChunkSize`: override export chunk size\n- `WithCustomQuerySize`: override query size estimation for queued query exports\n- `WithProgressBar`: write progress to console output\n- `WithColumnLimit`: limit exported columns through an end column\n\n## Import Targets\n\n- `ToModel`: convert each row to an Eloquent model, model array, or null\n- `ToCollection`: handle rows as a Laravel collection\n- `ToArray`: handle rows as arrays\n- `OnEachRow`: process a `Row` object one row at a time\n- `WithMappedCells`: map specific cells to named array keys\n\n## Import Reading Controls\n\n- `Importable`: object-level `import()`, `queue()`, `toArray()`, `toCollection()`, and console output support\n- `WithHeadingRow`: use a heading row for keys\n- `WithGroupedHeadingRow`: group duplicate heading names\n- `WithStartRow`: choose first data row\n- `WithLimit`: limit number of read rows\n- `WithColumnLimit`: limit read columns through an end column\n- `WithReadFilter`: use a PhpSpreadsheet read filter\n- `WithCalculatedFormulas`: read calculated formula results\n- `WithFormatData`: read formatted values\n- `WithCustomCsvSettings`: per-import CSV settings\n- `WithCustomValueBinder`: custom PhpSpreadsheet value binding\n- `SkipsEmptyRows`: skip empty rows\n- `SkipsUnknownSheets`: handle sheet names/indexes that do not exist\n- `RemembersRowNumber`: inspect current row number during import\n- `RemembersChunkOffset`: inspect current chunk offset during chunked import\n\n## Import Persistence, Validation, And Failures\n\n- `WithValidation`: row validation rules\n- `SkipsOnFailure`: handle validation failures without aborting\n- `SkipsFailures`: collect failures through `failures()`\n- `SkipsOnError`: handle thrown row errors without aborting\n- `SkipsErrors`: collect errors through `errors()`\n- `WithBatchInserts`: batch model inserts\n- `WithUpserts`: upsert by `uniqueBy()`\n- `WithUpsertColumns`: select columns updated during upsert\n- `WithSkipDuplicates`: skip duplicate rows during insert/upsert flows\n- `PersistRelations`: persist model relations from import rows\n- `ValidationException`\n- `Failure`\n- `RowSkippedException`\n\n## Queueing And Batching\n\n- Use `Illuminate\\Contracts\\Queue\\ShouldQueue` for queued exports/imports.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldBatch` when queue operations should return a pending batch.\n- Use `Maatwebsite\\Excel\\Concerns\\ShouldQueueWithoutChain` for queued imports without job chaining.\n- Queued exports use jobs such as `QueueExport`, `AppendDataToSheet`, `AppendQueryToSheet`, `AppendPaginatedToSheet`, `AppendViewToSheet`, `CloseSheet`, and `StoreQueuedExport`.\n- Queued imports use `QueueImport`, `ReadChunk`, `AfterImportJob`, `AfterBatch`, `AfterChunk`, and `ProxyFailures`.\n- `Jobs\\Middleware\\LocalizeJob` preserves locale preferences for queued work.\n- Remote temporary files support multi-server queue processing.\n\n## Events\n\n- `BeforeExport`\n- `BeforeWriting`\n- `BeforeSheet`\n- `AfterSheet`\n- `BeforeImport`\n- `AfterImport`\n- `AfterChunk`\n- `AfterBatch`\n- `ImportFailed`\n- Base event support through `Event` and `HasEventBus`\n\n## Console Commands And Stubs\n\n- `php artisan make:export ExportName`\n- `php artisan make:export ExportName --model=User`\n- `php artisan make:export ExportName --query`\n- `php artisan make:export ExportName --model=User --query`\n- `php artisan make:import ImportName`\n- `php artisan make:import ImportName --model=User`\n- Publish stubs with the package `stubs` publish tag.\n- Publish config with the package `config` publish tag.\n\n## Collection And Query Macros\n\n- `DownloadCollectionMixin`\n- `StoreCollectionMixin`\n- `DownloadQueryMacro`\n- `StoreQueryMacro`\n- `ImportMacro`\n- `ImportAsMacro`\n- `Collection::downloadExcel($fileName, $writerType = null, $withHeadings = false, $responseHeaders = [])`\n- `Collection::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::downloadExcel($fileName, $writerType = null, $withHeadings = false)`\n- `Builder::storeExcel($filePath, $disk = null, $writerType = null, $withHeadings = false)`\n- `Builder::import($filename, $disk = null, $readerType = null)`\n- `Builder::importAs($filename, callable $mapping, $disk = null, $readerType = null)`\n\n## Configuration Surface\n\n- `exports.chunk_size`\n- `exports.pre_calculate_formulas`\n- `exports.strict_null_comparison`\n- `exports.csv.delimiter`\n- `exports.csv.enclosure`\n- `exports.csv.line_ending`\n- `exports.csv.use_bom`\n- `exports.csv.include_separator_line`\n- `exports.csv.excel_compatibility`\n- `exports.csv.output_encoding`\n- `exports.csv.test_auto_detect`\n- `exports.properties.*`\n- `imports.read_only`\n- `imports.ignore_empty`\n- `imports.heading_row.formatter`\n- `imports.csv.delimiter`\n- `imports.csv.enclosure`\n- `imports.csv.escape_character`\n- `imports.csv.contiguous`\n- `imports.csv.input_encoding`\n- `imports.properties.*`\n- `imports.cells.middleware`\n- `extension_detector`\n- `value_binder.default`\n- `cache.driver`\n- `cache.batch.memory_limit`\n- `cache.illuminate.store`\n- `cache.default_ttl`\n- `transactions.handler`\n- `transactions.db.connection`\n- `temporary_files.local_path`\n- `temporary_files.local_permissions`\n- `temporary_files.remote_disk`\n- `temporary_files.remote_prefix`\n- `temporary_files.force_resync_remote`\n\n## Cache, Transactions, Files, And Cell Middleware\n\n- Cache drivers: `memory`, `illuminate`, `batch`\n- Cache classes: `CacheManager`, `MemoryCache`, `BatchCache`\n- Transactions: `TransactionManager`, `DbTransactionHandler`, `NullTransactionHandler`\n- Temporary files: `TemporaryFileFactory`, `LocalTemporaryFile`, `RemoteTemporaryFile`\n- Filesystem disk wrapper: `Files\\Disk`, `Files\\Filesystem`\n- Cell middleware: `TrimCellValue`, `ConvertEmptyCellValuesToNull`, and custom `CellMiddleware`\n- Value binders: package default binder, PhpSpreadsheet string binder, PhpSpreadsheet advanced binder, custom `WithCustomValueBinder`\n\n## Testing And Fakes\n\n- `Excel::fake()`\n- `Excel::assertDownloaded($fileName, $callback = null)`\n- `Excel::assertStored($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueued($filePath, $disk = null, $callback = null)`\n- `Excel::assertQueuedWithChain($chain)`\n- `Excel::assertExportedInRaw($className, $callback = null)`\n- `Excel::assertImported($filePath, $disk = null, $callback = null)`\n- `Excel::matchByRegex()`\n- `Excel::doNotMatchByRegex()`\n- Use real file reads through PhpSpreadsheet when cell values, sheets, formatting, formulas, drawings, or charts must be verified.\n\n## Maintenance Map\n\n- Concern changes: update matching `tests/Concerns/*Test.php`.\n- Facade/fake changes: update `tests/ExcelFakeTest.php`.\n- Queue changes: update `tests/QueuedExportTest.php`, `tests/QueuedImportTest.php`, `tests/QueuedQueryExportTest.php`, or `tests/QueuedViewExportTest.php`.\n- Macro changes: update `tests/Mixins/*Test.php`.\n- Validation changes: update `tests/Validators/RowValidatorTest.php`.\n- Cache changes: update `tests/Cache/BatchCacheTest.php`.\n- Service provider changes: update `tests/ExcelServiceProviderTest.php`.\n- PhpSpreadsheet compatibility changes: update `tests/PhpSpreadsheetV5CompatibilityTest.php`.\n</yakaai_skills>"}