companyService = $companyService; $this->companyImgService= $companyImgService; $this->auditReasonsRepository = $auditReasonsRepository; $this->emailService = $emailService; $this->smsService = $smsService; $this->jobsService = $jobsService; $this->taskService = $taskService; $this->searchService = $searchService; $this->msgRepository = $msgRepository; $this->resumeRepository = $resumeRepository; $this->pmsRepository = $pmsRepository; $this->memberInfoService = $memberInfoService; $this->memberSetmealRepository = $memberSetmealRepository; $this->feedbackService = $feedbackService; $this->companyRepository = $companyRepository; $this->recommend_limit = 10; $this->recommend_need_limit = 50; } //会员中心 public function index() { $user = auth('web-company')->user(); $mysetmeal = $this->memberSetmealRepository->getSetmealByUid($user->id, 1); $res = $this->companyService->index($user); //用于匹配简历的职位 session([ 'match_jobs_'.auth('web-company')->user()->id=>null]); $recommend_rst = $this->getRecommendResumes($this->recommend_limit); //获取推荐简历 $res['recommend_resumes'] = $recommend_rst['resumes']; $res['match_job'] = $recommend_rst['match_job']; $res['mysetmeal'] = $mysetmeal; return view('mobile.app.company.index', $res); } public function getRecommendResumes($limit = 10) { $need_limit = $this->recommend_need_limit; $order_by = array('stime'=>'desc','click'=>'desc', 'updated_at'=>'desc'); $list = array(); //企业用户 - 匹配置顶、刷新靠前的职位 $job = array(); if (auth('web-company')->check()) { $job = $this->companyService->getMatchJob(auth('web-company')->user()); } $click_where = $this->companyService->getRecommendResumeWhere(array()); $click_resumes = $this->searchService->search('Resume', $click_where, $order_by, '', $need_limit); $click_resumes = $click_resumes->items(); Cache::forever('recommend_click_resumes', $click_resumes); if ($job) { //获取匹配简历 $where = $this->companyService->getRecommendResumeWhere($job); $recommend_resume_lists = $this->searchService->search('Resume', $where, $order_by, '', $need_limit); $rids = $recommend_resume_lists->pluck('id')->toArray(); if ($recommend_resume_lists->total() >= $limit) { $list = array_slice($recommend_resume_lists->items(), 0, $limit); } else { //去除已有简历 if ($click_resumes && $rids) { foreach ($click_resumes as $k => $v) { if (in_array($v->id, $rids)) { unset($click_resumes[$k]); } } } $recommend_resumes = $recommend_resume_lists->items(); $recommend_total = $recommend_resume_lists->total(); $need_resumes = array_slice($click_resumes, 0, $need_limit - $recommend_total); $all_resumes = array_merge($recommend_resumes, $need_resumes); $list = array_slice($all_resumes, 0, $limit); } } else { $list = array_slice($click_resumes, 0, $limit); } return array( 'resumes' => $list, 'match_job' => $job ); } public function ajaxGetRecommendResumes(Request $request) { $limit = $this->recommend_limit; $need_limit = $this->recommend_need_limit; $jobnum = $request->input('jobnum'); $page = $request->input('page'); $job_id = $request->input('job_id'); $click_resumes = Cache::get('recommend_click_resumes'); $order_by = array('stime'=>'desc','click'=>'desc', 'updated_at'=>'desc'); if ($click_resumes === null) { $click_where = $this->companyService->getRecommendResumeWhere(array()); $click_resumes = $this->searchService->search('Resume', $click_where, $order_by, '', $need_limit); $click_resumes = $click_resumes->items(); Cache::forever('recommend_click_resumes', $click_resumes); } /* * 判断是否有在招职位 * - 无在招职位 ,获取下一页数据 * - 一个在招职位 ,获取下一页数据 * - 多个在招职位 ,获取下一个职位匹配数据 * 匹配简历数量不足时用点击量高的简历补齐,之多显示50个,超过以后重新循环 */ if ($jobnum == 0) { $next_page = (int)$page + 1; $list = array_slice($click_resumes, $page*$limit, $limit); if (!$list) { $list = array_slice($click_resumes, 0, $limit); $next_page = 1; } $match_job =0; } else { $this->companyService->setMatchJob($request->all(), auth('web-company')->user()); $next_page = 1; if ($jobnum == 1) { $next_page = (int)$page + 1; } $job = array(); if (auth('web-company')->check()) { $job = $this->companyService->getMatchJob(auth('web-company')->user()); } $where = $this->companyService->getRecommendResumeWhere($job); $recommend_resume_lists = $this->searchService->search('Resume', $where, $order_by, '', $need_limit); $rids = $recommend_resume_lists->pluck('id')->toArray(); if ($recommend_resume_lists->total() >= $next_page*$limit) { if ($jobnum == 1) { $list = array_slice($recommend_resume_lists->items(), 0, $limit); } else { $list = array_slice($recommend_resume_lists->items(), $page*$limit, $limit); } } else { if ($click_resumes && $rids) { foreach ($click_resumes as $k => $v) { if (in_array($v->id, $rids)) { unset($click_resumes[$k]); } } } $recommend_resumes = $recommend_resume_lists->items(); $recommend_total = $recommend_resume_lists->total(); $need_resumes = array_slice($click_resumes, 0, $need_limit - $recommend_total); $all_resumes = array_merge($recommend_resumes, $need_resumes); if ($jobnum == 1) { $list = array_slice($all_resumes, $page*$limit, $limit); if (!$list) { $list = array_slice($click_resumes, 0, $limit); $next_page = 1; } } else { $list = array_slice($all_resumes, 0, $limit); } } $match_job = $job->id; } $recommend_rst['resumes'] = $list; $html = view('app.company.ajax.ajax_resume_list', $recommend_rst)->render(); $return_data = array( 'status'=>1, 'html' => $html,'match_job'=>$match_job,'page'=>$next_page); return response()->json($return_data); } public function ajaxGetStatistics(Request $request) { $user = auth('web-company')->user(); return $this->companyService->ajaxGetStatistics($request->all(), $user); } /** *企业会员中心首页一键刷新职位 */ public function jobsRefreshAll() { $user = auth('web-company')->user(); return $this->jobsService->jobsRefreshAll($user); } public function com() { $user = auth('web-company')->user(); return view('mobile.app.company.com', ['user'=>$user,'wap_title'=>'企业信息']); } /**企业信息 * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \App\Exceptions\ResponseException */ public function companyInfo() { $user = auth('web-company')->user(); $companyInfo = $this->companyService->companyInfo($user); $companyInfo['wap_title'] = "企业详情"; return view('mobile.app.company.info', $companyInfo); } /** * @param CompanyValidatorRequest $request * @return \Illuminate\Http\JsonResponse * @throws \Throwable */ public function companySave(CompanyValidatorRequest $request) { $data = $request->except('_method', '_token'); $user = auth('web-company')->user(); $res = $this->companyService->mobileCompanySave($data,$user); return response()->json($res); } /**修改企业手机==企业中心 * @param Request $request * @return \Illuminate\Http\JsonResponse * @throws \Throwable */ public function modifyMobile(Request $request) { $user = auth('web-company')->user(); if ($request->method() == 'GET') { $mobile = $this->companyService->authMobile($user); return response()->json(['status'=>1,'data'=>view('app.company.ajax.ajax_auth_mobile', $mobile)->render()]); } return $this->companyService->verifyCode($request->mobile, $user); } /** * @保存企业logo * @param Request $request * @return \Illuminate\Http\JsonResponse * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function attach(Request $request) { $user = auth('web-company')->user(); $aveName = md5(time().uniqid()).'.jpg'; $data = base64_decode($request->logo); $stroge = storage_path('app/public/company/logo/'); $res = file_put_contents($stroge.$aveName, $data); $logo['logo'] = 'company/logo/'.$aveName; if ($res) { return $this->companyService->saveLogo($logo, $user); } response()->json(['status'=>0,'msg'=>'保存失败!']); } /**删除企业Logo * @return \Illuminate\Http\JsonResponse * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function logoDel() { $user = auth('web-company')->user(); return $this->companyService->logoDel($user); } /**企业风采 * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function companyImg() { $user = auth('web-company')->user(); $res = $this->companyImgService->list($user->id); return view('mobile.app.company.com_img', ['imgList'=>$res,'wap_title'=>'企业风采']); } /**保存企业风采 * @param Request $request * @return \Illuminate\Http\JsonResponse * @throws \ErrorException * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function saveImg(Request $request) { $user = auth('web-company')->user(); $aveName = md5(time().uniqid()).'.jpg'; $data = base64_decode($request->images); $stroge = storage_path('app/public/company/img/'); $res = file_put_contents($stroge.$aveName, $data); if ($res) { return $this->companyImgService->saveImg("company/img/".$aveName, $user); } response()->json(['status'=>0,'msg'=>'保存失败!']); } /** * 修改备注模态框 * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \Throwable */ public function remark(Request $request) { $res = $this->companyImgService->companyImg($request->id); return $res; } /** * 保存备注 * @param CompanyValidatorRequest $request * @return \Illuminate\Http\JsonResponse */ public function saveRemark(CompanyValidatorRequest $request) { $user = auth('web-company')->user(); return $this->companyImgService->saveRemark($request,$user); } /** * 删除企业风采 * @param $id * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\JsonResponse|\Illuminate\View\View */ public function delImg(Request $request) { $id= $request->id; if (!$id) { return response()->json(['status'=>0, 'msg'=>'参数错误!']); } $user = auth('web-company')->user(); return $this->companyImgService->delImg($id,$user); } /** * 企业认证 * @param $anew * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \App\Exceptions\ResponseException */ public function companyAuth($anew = '') { $user = auth('web-company')->user(); $companyInfo = $this->companyService->getInfoById($user); $companyInfo->reason = $this->auditReasonsRepository->getAuditReasons($user->id, 8); if ($anew == 'anew') { $companyInfo->audit = 0; } return view('mobile.app.company.com_auth', ['companyInfo'=>$companyInfo, 'anew'=>$anew,'wap_title'=>'企业认证']); } public function certificateSave(Request $request) { $aveName = md5(time().uniqid()).'.jpg'; $data= base64_decode($request->certificate_img_up); $stroge = storage_path('app/public/company/certificate/'); $res = file_put_contents($stroge.$aveName, $data); if ($res) { return response()->json(['status'=>1, 'msg'=>'营业执照保存成功', 'data'=>['img'=>"company/certificate/".$aveName,'path'=>upload_asset("company/certificate/".$aveName)]]); } else { return response()->json(['status'=>0, 'msg'=>'营业执照保存失败']); } } public function certificate(Request $request) { $user = auth('web-company')->user(); return $this->companyService->certificate($request->certificate_img_up, $user); } /** * 账户安全 * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \App\Exceptions\ResponseException */ public function companySecurity() { $user = auth('web-company')->user(); $companyInfo = $this->companyService->companySecurity($user); $companyInfo['wap_title']="帐户安全"; return view('mobile.app.company.com_security', $companyInfo); } public function companyBind() { $user = auth('web-company')->user(); $companyInfo = $this->companyService->companySecurity($user); $companyInfo['wap_title']="帐户绑定"; return view('mobile.app.company.com_binding', $companyInfo); } public function unBindThird(Request $request) { $alias = $request->alias; $user = auth('web-company')->user(); return $this->companyService->unBindThird($alias, $user); } public function myCode(Request $requset) { $sub_site = ''; if (get_subsite_id() > 0) { $sub_site = 'jkq.'; } $id = $requset->id?$requset->id:0; $user = $this->getLoginUser(); if ($user->id!=$id) { return $this->showMessage('参数错误', route($sub_site.'mobile.firm.index'), true); } return view('mobile.app.company.code', ['hashid'=>hashid_encode($user->id, 1),'img'=>QrCode::size(250)->generate(route($sub_site.'mobile.qrcode', ['hashid'=>hashid_encode($user->id, 1)]))]); } /**企业登录日志 * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\JsonResponse|\Illuminate\View\View * @throws \Throwable */ public function loginLog(Request $request) { $user = auth('web-company')->user(); $loginLog = $this->companyService->companyLoginLog($user); if ($loginLog->total()) { $loginLog=$loginLog->toArray(); $list = []; foreach ($loginLog['data'] as $key => $val) { $t = strtotime(date('Y-m-d', strtotime($val['created_at']))); $list[$t][] = $val; } $loginLog['data'] = $list; } $res['user'] = $user; $res['loginLog'] = $loginLog; if ($request->ajax()) { if ($loginLog['current_page'] >$loginLog['last_page']) { return response()->json(['status'=>0]); } return response()->json(['status'=>1,'data'=>view('mobile.app.company.ajax_tpl.ajax_com_log', ['loginLog'=>$loginLog])->render()]); } $res['wap_title']='会员日志'; return view('mobile.app.company.com_login_log', $res); } /**我的消息 * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\JsonResponse|\Illuminate\View\View * @throws \Throwable */ public function companyPms(Request $request) { $user = auth('web-company')->user(); $data = $request->all(); $res = $this->companyService->comPms($data, $user); if ($request->ajax()) { if ($res['pms']->currentPage() >$res['pms']->lastPage()) { return response()->json(['status'=>0]); } return response()->json(['status'=>1,'data'=>view('mobile.app.company.ajax_tpl.ajax_com_pms', ['pms'=>$res['pms']])->render()]); } $res['wap_title'] = "系统消息"; return view('mobile.app.company.com_pms', $res); } public function pmsRead(Request $request) { $id = $request->id; return $this->companyService->pmsRead($id); } public function msgSend() { $res = $this->companyService->msgSend(auth('web-company')->user(), request()->all()); if ($res) { $this->taskService->doTask(32); return response()->json(['status'=>1,'msg'=>'回复成功','data'=>['message'=>$res->message]]); } else { return response()->json(['status'=>0,'msg'=>'回复失败']); } } public function msgDelete() { if (request()->method()=='POST') { $res = $this->companyService->msgDelete(request()->all()); if ($res) { return $this->sendSuccessResponse('删除成功!'); } else { return $this->sendErrorResponse('删除失败!'); } } else { return view('app.person.ajax.resume_delete', ['tpis'=>'删除后将无法恢复,您确定要删除选择的咨询消息吗?']); } } public function companyPmsDel(Request $request) { if ($request->method()== 'POST') { $user = auth('web-company')->user(); return $this->companyService->companyPmsDel($request,$user); } $tip = "被删除后将无法恢复,您确定要删除选中的系统消息吗?"; return response()->json(['status'=>1,'data'=>['html'=>view('app.company.ajax.ajax_warning', ['tip'=>$tip])->render()]]); } public function companyPmsCheck(Request $request) { return $this->companyService->companyPmsCheck($request); } /** * */ public function companyPmsConsult(Request $request) { $user = auth('web-company')->user(); $res = $this->msgRepository->mobileMsg($user->utype, $user->id); if ($request->ajax()) { if ($res->currentPage() > $res->lastPage()) { return response()->json(['status'=>0]); } return response()->json(['status'=>1,'data'=>view('mobile.app.company.ajax_tpl.ajax_com_pms_consult', ['pms'=>$res])->render()]); } return view('mobile.app.company.com_pms_consult', ['pms'=>$res,'wap_title'=>"求职者咨询"]); } public function comPmsConsultShow(Request $request) { $user = auth('web-company')->user(); $parent_id = $request->id; if (!$parent_id) { return $this->showMessage('无此消息', route('mobile.firm.com.psm.consult'), true); } $pmsshow = $this->memberInfoService->mobileMsgShow($user, $parent_id); $pmsshow['user'] = $user; $pmsshow['wap_title'] = "求职者咨询"; // dd($pmsshow); return view('mobile.app.company.pms_consult_show', $pmsshow); } /** * 修改用户名 * */ public function modifyUsername() { $user = auth('web-company')->user(); $res = $this->companyService->modifyUserName($user); $res['wap_title'] = '修改用户名'; return view('mobile.app.company.com_username', $res); } /** 修改用户名 * @param CompanyValidatorRequest $request * @return CompanyController|\Illuminate\Http\JsonResponse * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function saveUsername(CompanyValidatorRequest $request) { $user = auth('web-company')->user(); if (!$this->companyService->saveUsername($request->username, $user)) { return response()->json(['status'=>0,'msg'=>"用户名修改失败"]); } return response()->json(['status'=>1,'msg'=>"用户名修改成功"]); } /**修改密码 * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function modifyPwd() { return view('mobile.app.company.com_modify_pwd', ['wap_title'=>'修改密码']); } /**修改密码======保存密码 * @param CompanyValidatorRequest $request * @return CompanyController|\Illuminate\Http\JsonResponse * @throws \App\Exceptions\ResponseException * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function savePwd(CompanyValidatorRequest $request) { $user = auth('web-company')->user(); if (!$this->companyService->savePwd($user, $request->oldpassword, $request->password, $request->password1)) { return response()->json(['status'=>0,'msg'=>"密码修改失败"]); } if ($user->mobile) { $this->smsService->sendSms($user->mobile, Smser::TEMPLATE_SMS_EDITPWD, ['sitename'=>subsite_config('aix.system.site.site.site_name'),'newpassword'=>$request->password]); } return response()->json(['status'=>1,'msg'=>"密码修改成功"]); } /** * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @手机认证弹窗 */ public function authMobile() { $user = auth('web-company')->user(); $mobile = $this->companyService->authMobile($user); $mobile['user']=$user; $mobile['wap_title']='手机认证'; return view('mobile.app.company.com_auth_mobile', $mobile); } /** * @param CompanyValidatorRequest $request * @return \Illuminate\Http\JsonResponse * @throws \App\Exceptions\ResponseException */ public function verifyCode(CompanyValidatorRequest $request) { $mobile = $request->mobile; $id = $request->id; if (!$this->companyService->checkMobileAudit($id, $mobile)->isEmpty()) { return response()->json(['status'=>0, 'msg'=>'手机已验证']); } $this->smsService->sendAuthSms($mobile, smser::TEMPLATE_AUTH_CHECK); return response()->json(['status'=>1,'msg'=>'短信验证码已发送']); } public function mobileAudit(CompanyValidatorRequest $request) { $user = auth('web-company')->user(); $mobile = $request->mobile; $verifyCode = $request->verifycode; $res = $this->smsService->checkAuthSms($mobile, smser::TEMPLATE_AUTH_CHECK, $verifyCode); if (!$res) { return response()->json(['status'=>0,'msg'=>'验证码错误']); } $res = $this->companyService->verifyCode($mobile, $user); if ($res['status']==1) { if (isset($res['data'])) { return response()->json(['status'=>1,'msg'=>'手机认证成功','data'=>['mobile'=>$mobile, 'points'=>$res['data']['points']]]); } else { return response()->json(['status'=>1,'msg'=>'手机认证成功','data'=>['mobile'=>$mobile]]); } } else { return response()->json(['status'=>0,'msg'=>'手机认证失败']); } } /**邮箱认证 * @return \Illuminate\Http\JsonResponse * @throws \Throwable */ public function authEmail() { $user = auth('web-company')->user(); if (!$email = $this->companyService->authEmail($user)) { return response()->json(['status'=>0,'msg'=>'参数错误!']); } $email['wap_title'] = '邮箱认证'; $email['user'] = $user; return view('mobile.app.company.com_auth_email', $email); // if (!$email = $this->companyService->authEmail()) { // return response()->json(['status'=>0,'msg'=>'参数错误!']); // } // return response()->json(['status'=>1,'msg'=>'查询成功!','data'=>view('app.company.ajax.ajax_auth_email', $email)->render()]); } /**认证Email 及修改状态 * @param CompanyValidatorRequest $request * @return \Illuminate\Http\JsonResponse */ public function emailSend(CompanyValidatorRequest $request) { $email = $request->email; $id = $request->id; if (!$this->companyService->checkEmailAudit($id, $email)->isEmpty()) { return response()->json(['status'=>0, 'msg'=>'email已验证!']); } $this->emailService->setAuthTag('company') ->setCallback('App\Services\Company\CompanyService', 'sendAuthEmailHook', [$email, auth('web-company')->user()]) ->sendAuthMail($email, EmailService::TEMPLATE_VALIDATION); return response()->json(['status'=>1,'msg'=>'email已发送!']); } /**签到 * @return \Illuminate\Http\JsonResponse */ public function sign() { $user = auth('web-company')->user(); $res = $this->companyService->signIn($user); return response()->json(['status'=>$res['code'],'msg'=>$res['msg'],'data'=>$res['info']]); } public function ajaxResumeSearch(Request $request) { $key = $request->input('key', ''); $search_type = $request->input('search_type', 'precise'); return response()->json(['status'=>1,'data'=>route(url_rewrite('AIX_resumelist'), ['key'=>$key, 'search_type'=>$search_type])]); } public function feedback() { $user = auth('web-company')->user(); $varify_suggest = 0; if (config('aix.system.site_safety.site_vo_code.captcha_open')==1) { $varify_suggest = 1; } $res = [ 'user'=>$user, 'varify_suggest'=>$varify_suggest, 'wap_title'=>'意见反馈', ]; return view('mobile.app.company.com_feedback', $res); } public function feedbackSave(FeedbackValidatorRequest $request) { $form_data = array( 'subsite_id' => get_subsite_id(), 'type' => $request->input('infotype'), 'content' => $request->input('feedback'), 'contact' => $request->input('tel'), 'audit' => 0 ); $rst = $this->feedbackService->addFeedback($form_data); $data = array('status'=>0); if ($rst) { $data = array('status'=>1,'msg'=>'反馈成功,感谢您对本站的关注!','insert_id'=>$rst->id); } else { $data = array('msg'=>'数据保存失败!'); } return response()->json($data); } //以下为微信H5招聘 public function wechatCom($id = 0) { $loginUser = $this->getLoginUser(); if (!$id) { return $this->showMessage('查无此企业', route('mobile.firm.com.wzp.index'), true); } $audit = config('aix.companyset.comset.show_set.jobs_display'); $company = $this->companyRepository->with(['imgs','job'=>function ($query) { $query->whereIn('audit', getJobsStatus())->where('display', 1)->where('valid', 1); }])->find($id); // dd($company); $show_menu = 0; if ($loginUser) { if ($company->id == $loginUser->id && $company->utype == $loginUser->utype) { $show_menu = 1; } } $phone_error = ''; $phone_error_tit = ''; $phone_url = ''; $phone_code = 0; $resume_error = '对不起,请登录后再投递简历'; $resume_error_tit = '登录'; $resume_url = route('mobile.login'); $resume_code = 0; if ($loginUser && $loginUser->utype == 2) { $resume_error = '对不起,请登录后再投递简历'; $resume_error_tit = '登录'; $resume_url = route('mobile.jobs.apply'); $resume_code = 1; } $resume = []; $res['show_menu'] = $show_menu; $res['praise'] = 0; if ($company->telephone_show ==1) { if (config('aix.companyset.comset.contact_set.showjobcontact') == 0) { $phone_error='企业未填写联系方式'; $phone_error_tit='确定'; $phone_url= ''; $phone_code = 1; } else { if (!$loginUser) { $phone_error='对不起,请登录后继续查看企业联系方式'; $phone_error_tit='登录'; $phone_url= route('mobile.login'); $phone_code = 0; } else { $phone_code = 1; } } } else { $phone_error='该企业不接受电话咨询,请直接投递简历'; $phone_error_tit='投递'; $phone_url = route('mobile.firm.com.wzp.send.resume', ['id'=>$company->id]); $phone_code = 0; } if ($loginUser && $loginUser->utype == 2) { $resume = $this->resumeRepository->findWhere(['uid'=>$loginUser->id]); } $res['phone_error'] = $phone_error; $res['phone_error_tit'] = $phone_error_tit; $res['phone_url'] = $phone_url; $res['phone_code'] = $phone_code; $res['resume_error'] = $resume_error; $res['resume_error_tit'] = $resume_error_tit; $res['resume_url'] = $resume_url; $res['resume_code'] = $resume_code; $res['resume'] = $resume; $res['user'] = $company; $res['loginUser'] = $loginUser; // $tpl =$company->wzp_tpl?"comred":'com'; $tpl = 'com'; return view("mobile.app.company.wzp.{$tpl}", $res); } }