use of chunk in laravel.

Report
Question
687 views

Use Of Chunk in laravel.

Please explain why do you think this question should be reported?

Report Cancel

$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

Leave an comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>