summaryrefslogtreecommitdiff
path: root/site/app
diff options
context:
space:
mode:
authorhorus2018-02-20 17:46:16 +0100
committerhorus2018-02-20 17:46:16 +0100
commitdd89c6608b213bfa72f5c1cb77d33f805b2b3bfa (patch)
tree86c354a00d6eb74a390e3874e1a35fde510e12be /site/app
parent0bc744ded5814273a9e1f3bf6fd09ffb252e4a87 (diff)
downloadalkobote-dd89c6608b213bfa72f5c1cb77d33f805b2b3bfa.tar.gz
Shows total count of offers in index page. (website)
Diffstat (limited to 'site/app')
-rw-r--r--site/app/Http/Controllers/IndexController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/site/app/Http/Controllers/IndexController.php b/site/app/Http/Controllers/IndexController.php
index 7b5ced4..b82d2cd 100644
--- a/site/app/Http/Controllers/IndexController.php
+++ b/site/app/Http/Controllers/IndexController.php
@@ -27,8 +27,10 @@ class IndexController extends Controller {
}
$data = DB::select($query);
+
+ $count = DB::select("SELECT count(*) as count FROM all_view")[0];
#$data = DB::table('whisky_view')->orderBy('procent', 'DESC')->limit(100)->simplePaginate(20);
- return view('index', ['data' => $data, 'views' => $views]);
+ return view('index', ['data' => $data, 'views' => $views, 'hits' => $count]);
}
}