- Can I use this package with a standard Laravel app (not TastyIgniter)?
- No, this package is tightly coupled with TastyIgniter v4.x and its admin panel structure. The core CSV/Excel logic could be adapted, but the admin UI and migrations are TastyIgniter-specific.
- What Laravel and PHP versions does this package support?
- It requires **TastyIgniter v4.x**, which mandates **PHP 8.3+** and **Laravel 10+**. Check compatibility with your TastyIgniter version before installing.
- How do I customize the import/export fields for a custom model (e.g., Products)?
- Create a config file at `resources/models/productimport.php` and define `columns` (CSV headers) and `fields` (custom options like `update_existing`). The package provides a `registerImportExport()` method for model integration.
- Does this handle large CSV/Excel files (>10MB) efficiently?
- By default, no—large exports may hit memory limits. For chunking, manually implement `offset`/`limit` in your `exportData()` method. Consider streaming with `league/csv` for better performance.
- Can I import Excel files with merged cells or formulas?
- The package uses `league/csv` (v9.1), which supports basic Excel (XLSX) but may struggle with complex formats like merged cells or formulas. Test thoroughly or use a dedicated Excel library for advanced needs.
- How do I handle validation errors during import?
- Use Laravel’s `Validator` in your custom `importData()` logic. The package doesn’t auto-rollback partial imports, so implement transactions or queue jobs for critical data to avoid inconsistencies.
- Are there built-in audit logs for import/export history?
- The package includes a history model, but it may not meet strict compliance needs (e.g., immutable logs). Extend the `ImportExportHistory` model or add custom logging for user tracking and change detection.
- Will this work with my existing database schema if it differs from TastyIgniter’s defaults?
- You’ll need to map custom columns manually in your config files (e.g., `productimport.php`). Test with case-sensitive columns or custom collations, as TastyIgniter’s migrations assume standard schemas.
- Can I trigger imports/exports via API (not just the admin panel)?
- Yes, but you’ll need to manually route API endpoints to the package’s controllers (e.g., `ImportExportController`). Add rate limiting or database locks if concurrent imports are a risk.
- What alternatives exist for Laravel CSV/Excel imports without TastyIgniter?
- For generic Laravel apps, consider `maatwebsite/excel` (feature-rich, supports complex Excel) or `spatie/laravel-data-import` (simpler, queue-based). These avoid TastyIgniter dependencies entirely.