I have this query eloquent in Laravel
, I was curious to know. If there is a way to know how many records inserted or how many records ignored to the table?
DB::table('mytable')->insertOrIgnore($data)
Note: One of the manual ways can be, counting records of table before and after process. but this has performance effect, if there be any better way achieving this.