public function getTrash($id = '') { if ($id == '') { $sections = Sections::getTrash(); $msg_success = Session::get('msg_success'); $msg_error = Session::get('msg_error'); return View::make('backend.sections.trash', array('sections' => $sections, 'msg_success' => $msg_success, 'msg_error' => $msg_error)); } else { $section = Sections::find($id); $trash = Sections::trash($id); if (!$trash) { return Redirect::to($this->route)->with('msg_error', Lang::get('messages.sections_trash_err', array('title' => $section->title, 'description' => $section->description, 'file' => $section->file))); } else { return Redirect::to($this->route)->with('msg_success', Lang::get('messages.sections_trash', array('title' => $section->title, 'description' => $section->description, 'file' => $section->file))); } } }