I am updating models inside Larave 4 chunk
method, but half of models is not beeing updating. Looks like after process only half of records it stops, but I dont understand why, I tried to change chunk size and total size of records. If I have 1522 records it processes only 800, if I have 722 total it processes only 400..
Books::whereNull($slugField)->chunk(100, function (Collection $entries) {
foreach ($entries as $entry) {
$entry->slug = 'test';
$entry->save();
}
});
Any ideas? thanks