make()->each(function (Range $range) use (&$jj) { $range->order = $jj; $range->saveOrFail(); $jj = $jj + 1; }); } }