Laravel-Excel
Laravel-Excel copied to clipboard
[Bug]: SkipsOnError doesnt actually skips
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
- [X] Yes, it's still reproducable
What version of Laravel Excel are you using?
3.1
What version of Laravel are you using?
9.2
What version of PHP are you using?
8.1.6
Describe your issue
Invalid rows should be skipped, and valid rows should be inserted, instead, nothing gets inserted
config/excel.php is as it comes, nothing changed from default, by reading documentation I dont know if there is something I need to change (altho I tried some modifications but nothing made it work)
Below is the import meaningful code

And the controller method just in case

How can the issue be reproduced?
Try and import an excel with valid and invalid rows, with the SkipsOnFailure + SkipsFailures traits, nothing gets inserted
What should be the expected behaviour?
The rows that fails validation gets skipped, and the other gets inserted
If you believe this is a bug, please provide a failing unit test via a PR
Sure I will, but I need to know if the code is correct before confirming its a bug
Depending what's in the rules and model methods it seems correct. Not sure about the upserts, but should work as well
This bug report has been automatically closed because it has not had recent activity. If this is still an active bug, please comment to reopen. Thank you for your contributions.