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, 6 insertions, 0 deletions
diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php
index 50f2bf4..824a2e2 100644
--- a/app/Http/Controllers/IndexController.php
+++ b/app/Http/Controllers/IndexController.php
@@ -47,6 +47,12 @@ class IndexController extends Controller
return view('list', ["articles" => $articles, "count" => $count]);
}
+ public function show( $id ) {
+ $articles = Article::where('id', $id);
+ $articles = $articles->simplePaginate(10);
+ return view('list', ["articles" => $articles, "count" => 1]);
+ }
+
public function search(Request $request) {
$search_unsafe = $request->input("q");