waad/filament-import-wizard
category_id auto-matches CategoryId in CSV). Ideal for teams managing SaaS platforms with nested data structures.boot() and observers ensure critical logic (e.g., model events, accessors) fires during imports, aligning with Laravel’s ecosystem. Critical for apps relying on model events for notifications, auditing, or side effects.whereJsonContains) removes Spatie dependency, improving compatibility with Laravel’s built-in translatable fields or custom JSON storage. Simplifies multi-language imports (e.g., title_en, description_es).completed_with_errors status) and chunked inserts mitigate memory issues for large datasets (100K+ rows), while normalizeRecordKeys() prevents SQL errors during bulk operations.BelongsTo).field_en). Custom translatable packages (e.g., spatie/laravel-translatable) may need adapter layers.BelongsTo/HasMany, but deeply nested relationships (e.g., HasManyThrough) may still need custom resolveFillable() extensions.completed_with_errors status enables better job monitoring (e.g., Horizon dashboards) and user feedback.spatie/laravel-translatable. Test with json columns or custom translatable fields.boot() or observers during imports must verify new insertRecordsAsModels() behavior.$cachedRelations improves speed but adds memory overhead for large models. Monitor memory_limit in production.id as string/number) may require custom normalizeRecordKeys() extensions.title_en may fail for non-standard locale formats (e.g., title-french). Validate with app-specific locales.completed_with_errors status helps but may obscure root causes (e.g., validation errors). Extend with custom logging.title_en, title-fr)? Are there non-standard formats?created, saved) during imports? How will these be tested with the new insertRecordsAsModels()?completed_with_errors status be surfaced to users (e.g., email alerts, dashboard notifications)?ENUM, JSONB) that may conflict with auto-mapping?UNIQUE keys on email)?spatie/laravel-translatable may need schema migrations.UNIQUE/PRIMARY KEY columns.Prerequisites:
php artisan queue:work --daemon).composer require waad/filament-import-wizard --update
Configuration:
Panel provider.title_en).Implementation:
Resource or Page:
use Waad\FilamentImportWizard\FilamentImportWizard;
public static function getPages(): array {
return [
FilamentImportWizard::make('UsersImport')
->model(User::class)
->translatableFields(['title', 'description']), // Optional: declare translatable fields
];
}
initializeModelFieldMappings().Testing:
resolveFillable(), normalizeRecordKeys(), and insertRecordsAsModels() with edge cases (e.g., missing columns, malformed JSON).insertRecordsAsModels()).title_en for a title JSON column).completed_with_errors).en vs. EN).Phase 1: Setup & Validation (2–3 days):
**Phase
How can I help you explore Laravel packages today?