use of chunk in laravel.
ReportQuestion
2 years ago 687 views
Use Of Chunk in laravel.
$regions = array();
ModelName::chunk(10, function($users) use (&$regions ) {
foreach ($users as $user)
{
$user->material_name = json_decode($user->material_name) ;
$regions[] = $user;
}
});
return $regions;
Thread Reply