I'm answering myself, maybe this will be useful to someone.
Initiate the Database globally on the BaseController in the "initController" function:
PHP Code:
$this->db = \Config\Database::connect();
// And use it anywhere:
$query = $this->db->query('SELECT name FROM users');
$data['results'] = $query->getResult();