/** * [roleReport description] * @param string $roleid [description] * @param string $flag [description] * @param string $type [description] * @return [type] [description] */ public function roleReport($roleid = "", $flag = "", $type = "") { $training = new UserTraining(); if ($roleid == '') { $roles = Roles::all(); //var_dump($roles[0]);exit; return View::make('train.reportrole')->with('rs', $roles); } else { if ($roleid != '' and $flag == '') { $rs = $training->getUserTrainByRoleId($roleid); // var_dump($rs);exit; return View::make('train.reportrole_ajax')->with('rs', $rs)->with('role_id', $roleid); } else { $role_obj = new Roles(); $this->rolename = $role_obj->getRoleName($roleid)->role_name; $rs = $training->getUserTrainByRoleId($roleid); $this->exportXls($rs, $type); } } }