config->baseURL); if ($this->request->getMethod() === 'post') { $file = $this->request->getFile('avatar'); if ($file->isValid() && ! $file->hasMoved()) { $fileName = $file->getRandomName(); $file->move(WRITEPATH.'uploads', $fileName); } } echo view('form'); } //-------------------------------------------------------------------- public function hooks() { Hooks::trigger('myhook'); } //-------------------------------------------------------------------- public function twodbs() { $db1 = \Config\Database::connect('default'); $db2 = \Config\Database::connect('tests'); echo view('form'); // d($db1->listTables()); // d($db2->listTables()); } //-------------------------------------------------------------------- public function vfs() { return view('form'); } //-------------------------------------------------------------------- }