public function edit($id) { if (!($latest = Latest::findById($id))) { Flash::set('error', __('Latest slider not found!')); redirect(get_url('latest')); } // check if trying to save if (get_request_method() == 'POST') { return $this->_edit($id); } $this->display('latest/view', array('latest' => $latest)); }