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\Event($this->$bdd);
$this->model = $this->model ?? new \models\Event($this->bdd);
return $this->model;
}
@ -40,7 +40,7 @@ namespace controllers\internals;
*/
public function get_lasts_by_date_for_user (int $id_user, int $nb_entry)
{
return $this->get_lasts_by_date_for_user($id_user, $nb_entry);
return $this->get_model()->get_lasts_by_date_for_user($id_user, $nb_entry);
}
@ -59,6 +59,6 @@ namespace controllers\internals;
'text' => $text,
];
return $this->model_event->insert($event);
return $this->get_model()->insert($event);
}
}