Browse Source

[Administration] Dashboard : optimisation (suppression count users)

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
b9b9af2b6d
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      backend/controllers/SiteController.php

+ 1
- 3
backend/controllers/SiteController.php View File

*/ */
public function actionIndex() public function actionIndex()
{ {

// commandes // commandes
$optionDashboardNumberDistributions = Producer::getConfig('option_dashboard_number_distributions') ; $optionDashboardNumberDistributions = Producer::getConfig('option_dashboard_number_distributions') ;
$dashboardNumberDistributions = $optionDashboardNumberDistributions ? $optionDashboardNumberDistributions : 3 ; $dashboardNumberDistributions = $optionDashboardNumberDistributions ? $optionDashboardNumberDistributions : 3 ;
]); ]);


// clients // clients
$nbUsers = User::searchCount();

$usersArray = User::findBy() $usersArray = User::findBy()
->orderBy('created_at DESC') ->orderBy('created_at DESC')
->limit(5) ->limit(5)
'distributionsArray' => $distributionsArray, 'distributionsArray' => $distributionsArray,
'ordersArray' => $ordersArray, 'ordersArray' => $ordersArray,
'usersArray' => $usersArray, 'usersArray' => $usersArray,
'nbUsers' => $nbUsers,
'usersNegativeCredit' => $usersNegativeCredit, 'usersNegativeCredit' => $usersNegativeCredit,
'producer' => $producer, 'producer' => $producer,
'productsCount' => $productsCount, 'productsCount' => $productsCount,

Loading…
Cancel
Save