当前位置: 首页>>代码示例>>PHP>>正文


PHP Language::wherePidAndLanguage方法代码示例

本文整理汇总了PHP中app\Language::wherePidAndLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::wherePidAndLanguage方法的具体用法?PHP Language::wherePidAndLanguage怎么用?PHP Language::wherePidAndLanguage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Language的用法示例。


在下文中一共展示了Language::wherePidAndLanguage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: store


//.........这里部分代码省略.........
                     $destinationPath = 'upload';
                     $skillCertificateExtension = Input::file('skills_certificate_' . $c)->getClientOriginalExtension();
                     $skillCertificateName = rand(11111, 99999) . '_skill_certificate' . '.' . $skillCertificateExtension;
                     Input::file('skills_certificate_' . $c)->move($destinationPath, $skillCertificateName);
                 }
             } else {
                 $skillCertificateName = '';
             }
             $ret = SkillsInformation::wherePidAndSkills($input['resumeId'], $input["skill_" . $c])->first();
             if ($ret) {
                 $resume = SkillsInformation::find($ret->id);
                 // $resume->skills = $input["skill_".$c];
                 $resume->proficiency = $input["proficiency_" . $c];
                 if ($skillCertificateName != '') {
                     $resume->skills_certificate = $skillCertificateName;
                 }
                 $resume->save();
             } else {
                 $resume = new SkillsInformation();
                 $resume->pid = $input['resumeId'];
                 $resume->skills = $input["skill_" . $c];
                 $resume->proficiency = $input["proficiency_" . $c];
                 $resume->skills_certificate = isset($skillCertificateName) ? $skillCertificateName : '';
                 $resume->save();
             }
         }
         return view('resume.create')->with('id', $input['resumeId'])->with('state', $input['level'] + 1);
         //$resume->
     }
     if ($input['level'] == 5 && $input['resumeId'] > 0) {
         //return $input;
         $t = $input['languageCount'];
         for ($c = 1; $c <= $t; $c++) {
             $ret = Language::wherePidAndLanguage($input['resumeId'], $input['language_' . $c])->first();
             if ($ret) {
                 $resume = Language::find($ret->id);
                 $resume->lspoken = $input['lspoken_' . $c];
                 $resume->lwritten = $input['lwritten_' . $c];
                 $resume->save();
             } else {
                 $resume = new Language();
                 $resume->pid = $input['resumeId'];
                 $resume->language = $input['language_' . $c];
                 $resume->lspoken = $input['lspoken_' . $c];
                 $resume->lwritten = $input['lwritten_' . $c];
                 $resume->save();
             }
         }
         return view('resume.create')->with('id', $input['resumeId'])->with('state', $input['level'] + 1);
         //$resume->
     }
     if ($input['level'] == 6 && $input['resumeId'] > 0) {
         if (Input::file('sdocument')) {
             $sdocument = array('file' => Input::file('sdocument'), 'extention' => Input::file('sdocument')->getClientOriginalExtension());
             $rules = array('file' => 'required|max:2048', 'extention' => 'required|In:jpeg,bmp,png,pdf,doc,docx');
             $validator = Validator::make($sdocument, $rules);
             if ($validator->fails()) {
                 // send back to the page with the input data and errors
                 // $validator->errors()->add('passport', 'File size must be less than 2MB and only .jpeg,.bmp,.png');
                 Session::flash('message', 'File must be less than 2Mb and only jpeg,bmp,png,pdf,doc,docx');
                 return view('resume.create')->withErrors($validator)->with('id', $input['resumeId'])->with('state', $input['level']);
             } else {
                 $sdocument = array('sdocument' => Input::file('sdocument'));
                 $destinationPath = 'upload';
                 $sdocumentExtension = Input::file('sdocument')->getClientOriginalExtension();
                 $sdocumentName = rand(11111, 99999) . '_sdocument' . '.' . $sdocumentExtension;
开发者ID:bimnaresh,项目名称:recruitment_history,代码行数:67,代码来源:ResumeController.php


注:本文中的app\Language::wherePidAndLanguage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。