Import Action not working

I have implemented the ImportAction to import rows into the members table. After uploading the CSV file and mapping the columns accordingly, the imported CSV is added to the imports table in my database, and a job batch is also created in the database. However, the job does not get processed. In the job_batches table, both processed_rows and failed_rows remain at 0. I have tried running the following commands: php artisan queue:work php artisan queue:listen but nothing seems to work. I've watched some YouTube videos as references, and most of them had a jobs table in their database, while I don't. Currently, I have QUEUE_CONNECTION=sync in my .env file because I need it for another part of my application. I also tried customizing the import connection in MemberImporter.php: public function getJobConnection(): ?string { return 'database'; }
1 Reply
Mohamed Ayaou
Mohamed Ayaou2mo ago
"most of them had a jobs table in their database"
php artisan make:queue-table

php artisan migrate
php artisan make:queue-table

php artisan migrate
https://laravel.com/docs/12.x/queues#database
Queues - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.

Did you find this page helpful?