| @@ 475-488 (lines=14) @@ | ||
| 472 | ]); |
|
| 473 | ||
| 474 | // Save new courses. |
|
| 475 | if (isset($courses['new'])) { |
|
| 476 | foreach ($courses['new'] as $courseInput) { |
|
| 477 | $course = new Course(); |
|
| 478 | $course->applicant_id = $applicant->id; |
|
| 479 | $course->fill([ |
|
| 480 | 'name' => $courseInput['name'], |
|
| 481 | 'institution' => $courseInput['institution'], |
|
| 482 | 'course_status_id' => $courseInput['course_status_id'], |
|
| 483 | 'start_date' => $courseInput['start_date'], |
|
| 484 | 'end_date' => $courseInput['end_date'] |
|
| 485 | ]); |
|
| 486 | $course->save(); |
|
| 487 | } |
|
| 488 | } |
|
| 489 | ||
| 490 | // Update old courses. |
|
| 491 | if (isset($courses['old'])) { |
|
| @@ 521-534 (lines=14) @@ | ||
| 518 | ]); |
|
| 519 | ||
| 520 | // Save new work_experiences. |
|
| 521 | if (isset($work_experiences['new'])) { |
|
| 522 | foreach ($work_experiences['new'] as $workExperienceInput) { |
|
| 523 | $workExperience = new WorkExperience(); |
|
| 524 | $workExperience->applicant_id = $applicant->id; |
|
| 525 | $workExperience->fill([ |
|
| 526 | 'role' => $workExperienceInput['role'], |
|
| 527 | 'company' => $workExperienceInput['company'], |
|
| 528 | 'description' => $workExperienceInput['description'], |
|
| 529 | 'start_date' => $workExperienceInput['start_date'], |
|
| 530 | 'end_date' => $workExperienceInput['end_date'] |
|
| 531 | ]); |
|
| 532 | $workExperience->save(); |
|
| 533 | } |
|
| 534 | } |
|
| 535 | ||
| 536 | // Update old work_experiences. |
|
| 537 | if (isset($work_experiences['old'])) { |
|
| @@ 141-154 (lines=14) @@ | ||
| 138 | } |
|
| 139 | ||
| 140 | // Save new courses. |
|
| 141 | if (isset($courses['new'])) { |
|
| 142 | foreach ($courses['new'] as $courseInput) { |
|
| 143 | $course = new Course(); |
|
| 144 | $course->applicant_id = $applicant->id; |
|
| 145 | $course->fill([ |
|
| 146 | 'name' => $courseInput['name'], |
|
| 147 | 'institution' => $courseInput['institution'], |
|
| 148 | 'course_status_id' => $courseInput['course_status_id'], |
|
| 149 | 'start_date' => $courseInput['start_date'], |
|
| 150 | 'end_date' => $courseInput['end_date'] |
|
| 151 | ]); |
|
| 152 | $course->save(); |
|
| 153 | } |
|
| 154 | } |
|
| 155 | ||
| 156 | // Update old courses. |
|
| 157 | if (isset($courses['old'])) { |
|
| @@ 198-211 (lines=14) @@ | ||
| 195 | } |
|
| 196 | ||
| 197 | // Save new work_experiences. |
|
| 198 | if (isset($work_experiences['new'])) { |
|
| 199 | foreach ($work_experiences['new'] as $workExperienceInput) { |
|
| 200 | $workExperience = new WorkExperience(); |
|
| 201 | $workExperience->applicant_id = $applicant->id; |
|
| 202 | $workExperience->fill([ |
|
| 203 | 'role' => $workExperienceInput['role'], |
|
| 204 | 'company' => $workExperienceInput['company'], |
|
| 205 | 'description' => $workExperienceInput['description'], |
|
| 206 | 'start_date' => $workExperienceInput['start_date'], |
|
| 207 | 'end_date' => $workExperienceInput['end_date'] |
|
| 208 | ]); |
|
| 209 | $workExperience->save(); |
|
| 210 | } |
|
| 211 | } |
|
| 212 | ||
| 213 | // Update old work_experiences. |
|
| 214 | if (isset($work_experiences['old'])) { |
|