From eb671bdcb48bb6be3e30226f6d7b6b0c642c9371 Mon Sep 17 00:00:00 2001 From: Mathias Cadet Date: Sat, 7 Sep 2019 00:24:03 +0200 Subject: [PATCH] add EOF while saving --- src/Http/Controllers/SaveFileContentController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/SaveFileContentController.php b/src/Http/Controllers/SaveFileContentController.php index 7f61d32..3192eab 100644 --- a/src/Http/Controllers/SaveFileContentController.php +++ b/src/Http/Controllers/SaveFileContentController.php @@ -17,7 +17,7 @@ public function __invoke(FileContentsRequest $request) $this->ensureFileExistInProject($filePath); - file_put_contents($filePath, $request->get('value')); + file_put_contents($filePath, rtrim($request->get('value')).PHP_EOL); return ['saved' => true]; }