public function menu() { if ($this->f3->exists('POST.create')) { $user = new User($this->db); $user->add(); $this->f3->reroute('/'); } else { $item = new Item($this->db); $this->f3->set('items', $item->getAllByCategoryId(1, 1)); $this->f3->set('view', 'user/item.html'); } }