I have a custom query that grabs data from the old system and maps it to models in the new system. The query looks like this:
$companies = DB::connection(\'leg
Try using the orderBy clause:
DB::table('tbl')->where('num', '>', 3)->orderBy('id')->chunk(500, function($rows) { // process $rows });