From 1def7f3375abcaa35adf2374906333f0fddf859d Mon Sep 17 00:00:00 2001 From: tabuna Date: Sun, 31 Mar 2024 03:05:43 +0300 Subject: [PATCH] refs #97 Fixed display placeholder for post preview --- app/Http/Controllers/PostController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PostController.php b/app/Http/Controllers/PostController.php index e3252880..065a5f2a 100644 --- a/app/Http/Controllers/PostController.php +++ b/app/Http/Controllers/PostController.php @@ -76,8 +76,8 @@ public function show(Post $post) public function preview(Request $request) { return turbo_stream()->replace('post-preview', view('post.preview', [ - 'title' => $request->input('title', 'Заголовок'), - 'content' => $request->input('content', 'Текст публикации'), + 'title' => $request->input('title') ?? 'Заголовок', + 'content' => $request->input('content') ?? 'Текст публикации', ])); }