From 2bb1fb114ad47e5063aa72b7d31065531f4db3d4 Mon Sep 17 00:00:00 2001 From: horus Date: Tue, 16 Jan 2024 23:52:39 +0100 Subject: . --- app/Http/Controllers/IndexController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Http') diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index f24d1ad..62bec0e 100644 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -58,7 +58,11 @@ class IndexController extends Controller public function show( $id ) { $articles = Article::where('id', $id); $articles = $articles->simplePaginate(10); - return view('list', ["articles" => $articles, "count" => 1]); + $page_title = ""; + foreach($articles as $a) { + $page_title = $a->title; + } + return view('list', ["articles" => $articles, "count" => 1, "page_title" => $page_title]); } public function search(Request $request) { -- cgit v1.2.3