本文整理汇总了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;