Update all controllers get_model

This commit is contained in:
osaajani 2019-11-14 21:44:31 +01:00
parent bc622285a4
commit 27d2a6c5b2
14 changed files with 69 additions and 40 deletions

View file

@ -45,6 +45,17 @@ namespace models;
{
return $this->_select_one($this->get_table_name(), ['id' => $id]);
}
/**
* Return all entries for a user
* @param int $id_user : user id
* @return array
*/
public function gets_for_user(int $id_user)
{
return $this->_select($this->get_table_name(), ['id_user' => $id_user]);
}
/**