Refactor file path construction for pre-update component

This commit is contained in:
Julian Prieber 2024-12-19 17:03:13 +01:00
parent 62621a6e81
commit 40dd91a89f

View File

@ -181,7 +181,8 @@
try {
$file = Http::timeout(10)->get($preUpdateServer)->body();
file_put_contents(base_path('resources/views/components/pre-update.blade.php'), $file);
$filePath = base_path('resources' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'pre-update.blade.php');
file_put_contents($filePath, $file);
} catch (Exception $e) {
session(['update_error' => 'Could not prepare update. ' . $e->getMessage()]);
}