summaryrefslogtreecommitdiff
path: root/app/Http/Controllers/IndexController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http/Controllers/IndexController.php')
-rw-r--r--app/Http/Controllers/IndexController.php6
1 files changed, 5 insertions, 1 deletions
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) {