Laravel Chunk Eloquent Method Example - Tuts Make

PHOTO EMBED

Thu Aug 12 2021 16:47:00 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

User::orderBy('id')->chunk(100, function ($users) {
    foreach ($users as $user) {

        // write your email send code here
    }
});
content_copyCOPY

https://www.tutsmake.com/laravel-chunk-eloquent-method-example/