protected function onGet(\Controllers\Request $input) { $id = $this->input->get('id'); $this->data['plant'] = Plant::find($id); if (!$this->data['plant']) { return $this->redirect($this->plugin->plants_url()); } return parent::onGet($input); }