Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function handle() |
||
40 | { |
||
41 | $modules = Module::whereNotNull('model_class')->get(); |
||
42 | foreach ($modules as $module) { |
||
43 | $this->info('Generating cache for <comment>'.$module->name.'</comment>'); |
||
44 | |||
45 | $modelClass = $module->model_class; |
||
46 | $modelClass::chunkById(300, function ($records) { |
||
47 | foreach ($records as $record) { |
||
48 | $record->uuid; // Automaticaly generate cache (see \Uccello\Core\Support\Traits\UccelloModule getUuidAttribute()) |
||
49 | } |
||
54 |