namespace BookStack\Api;
+use BookStack\App\AppVersion;
use BookStack\Http\ApiController;
use Exception;
use Illuminate\Contracts\Container\BindingResolutionException;
*/
public static function generateConsideringCache(): Collection
{
- $appVersion = trim(file_get_contents(base_path('version')));
+ $appVersion = AppVersion::get();
$cacheKey = 'api-docs::' . $appVersion;
$isProduction = config('app.env') === 'production';
$cacheVal = $isProduction ? Cache::get($cacheKey) : null;