Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
47 | private function modelsWithRelations(array $models): array |
||
48 | { |
||
49 | if (Cache::has('schematics')) { |
||
50 | return Cache::get('schematics'); |
||
51 | } |
||
52 | |||
53 | $data = [ |
||
54 | 'models' => $models, |
||
55 | 'relations' => RelationMapper::map($models), |
||
56 | ]; |
||
57 | |||
58 | Cache::put('schematics', $data, 1440); |
||
59 | |||
60 | return $data; |
||
61 | } |
||
62 | } |
||
63 |