File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ public function handle(): void
30
30
File::ensureDirectoryExists (storage_path ($ dir ));
31
31
$ now = now ()->format ('Y-m-d-H-i-s ' );
32
32
33
- File::put (storage_path ("{$ dir }/full- {$ now }.json " ), $ result ->toJson (JSON_PRETTY_PRINT ));
34
- File::put (storage_path ("{$ dir }/autocomplete- {$ now }.json " ), json_encode ($ autocompleting ->flip (), JSON_PRETTY_PRINT ));
35
-
36
33
if (!$ this ->option ('from-file ' )) {
37
- File::put (storage_path ("{$ dir }/autocomplete- {$ now }.php " ), $ code );
34
+ File::put (storage_path ("{$ dir }/ {$ now }-01-code .php " ), $ code );
38
35
}
36
+
37
+ File::put (storage_path ("{$ dir }/ {$ now }-02-autocomplete.json " ), json_encode ($ autocompleting ?->flip() ?? [], JSON_PRETTY_PRINT ));
38
+ File::put (storage_path ("{$ dir }/ {$ now }-03-full.json " ), $ result ->toJson (JSON_PRETTY_PRINT ));
39
39
}
40
40
41
- echo json_encode ($ autocompleting ->flip (), $ this ->option ('debug ' ) ? JSON_PRETTY_PRINT : 0 );
41
+ echo json_encode ($ autocompleting? ->flip() ?? [] , $ this ->option ('debug ' ) ? JSON_PRETTY_PRINT : 0 );
42
42
43
43
// dd($autocompleting->flip(), 'Autocompleting');
44
44
// // $toAutocomplete = $this->findFirstAutocompleting($result->toArray()['children']);
You can’t perform that action at this time.
0 commit comments