Stuff
This commit is contained in:
parent
46edaccf86
commit
2e8b5f5f2a
1 changed files with 3 additions and 3 deletions
|
@ -15,9 +15,9 @@ class DashboardController extends BaseController
|
|||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
|
||||
public function dashboardView() {
|
||||
$currentSize = DB::select("SELECT SUM(size) AS `size` FROM images LEFT JOIN galleries ON images.gallery = galleries.id WHERE galleries.tenant = 1;")[0]->size;
|
||||
$currentTraffic = DB::select("SELECT SUM(size) AS size FROM access WHERE tenant = 1 AND created_at >= NOW() - INTERVAL 1 DAY;")[0]->size;
|
||||
$monthlyTraffic = DB::select("SELECT SUM(traffic) AS `traffic` FROM traffic WHERE `year` = 2021 AND `month` = 1 and tenant = 1;")[0]->traffic;
|
||||
$currentSize = DB::select("SELECT SUM(size) AS `size` FROM images LEFT JOIN galleries ON images.gallery = galleries.id WHERE galleries.tenant = ".session("current_tenant_id").";")[0]->size;
|
||||
$currentTraffic = DB::select("SELECT SUM(size) AS size FROM access WHERE tenant = ".session("current_tenant_id")." AND created_at >= NOW() - INTERVAL 1 DAY;")[0]->size;
|
||||
$monthlyTraffic = DB::select("SELECT SUM(traffic) AS `traffic` FROM traffic WHERE `year` = 2021 AND `month` = 1 and tenant = ".session("current_tenant_id").";")[0]->traffic;
|
||||
$lastDaysTreffic = Traffic::getLastDays(7);
|
||||
$lastDaysSize = Storage::getLastDays(7);
|
||||
return view("dashboard.index", [
|
||||
|
|
Loading…
Reference in a new issue