fix lot of errors, working dashboard

This commit is contained in:
osaajani 2019-11-14 22:33:00 +01:00
parent 27d2a6c5b2
commit 6d9b1289fd
27 changed files with 89 additions and 73 deletions

View file

@ -21,7 +21,7 @@ namespace controllers\internals;
*/
protected function get_model () : \descartes\Model
{
$this->model = $this->model ?? new \models\Sended($this->$bdd);
$this->model = $this->model ?? new \models\Sended($this->bdd);
return $this->model;
}
@ -126,6 +126,14 @@ namespace controllers\internals;
*/
public function count_by_day_since_for_user(int $id_user, $date)
{
return $this->get_model()->count_by_day_since_for_user($id_user, $date);
$counts_by_day = $this->get_model()->count_by_day_since_for_user($id_user, $date);
$return = [];
foreach ($counts_by_day as $count_by_day)
{
$return[$count_by_day['at_ymd']] = $count_by_day['nb'];
}
return $return;
}
}