redesign calendar api for improving loading performance
This commit is contained in:
parent
78d542cbac
commit
d2b2cea846
5 changed files with 76 additions and 99 deletions
|
|
@ -95,6 +95,13 @@ return [
|
|||
}
|
||||
}
|
||||
|
||||
return json_encode($calendar);
|
||||
$jsonCalendar = json_encode($calendar);
|
||||
|
||||
$seasonDirPath = __DIR__ . '/../../../content/' . $currentSeason->diruri() . '/data.json';
|
||||
$dataFile = fopen($seasonDirPath, "w");
|
||||
fwrite($dataFile, $jsonCalendar);
|
||||
fclose($dataFile);
|
||||
|
||||
return $jsonCalendar;
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue