1. Go to this page and download the library: Download waad/filament-import-wizard library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
waad / filament-import-wizard example snippets
use Waad\FilamentImportWizard\Actions\ImportWizardAction;
protected function getHeaderActions(): array
{
return [
ImportWizardAction::make(),
];
}
ImportWizardAction::make()
->forModel(\App\Models\Product::class)
->chunkSize(500) // Process 500 rows per job
->enableUpsert(true) // Update existing records
->upsertKeys(['sku']) // Match by SKU field
->queueConnection('redis') // Custom queue connection
->queueName('imports'); // Custom queue name