| @@ 55-64 (lines=10) @@ | ||
| 52 | * |
|
| 53 | * @author Bertrand Kintanar <[email protected]> |
|
| 54 | */ |
|
| 55 | public function storeWorkExperience(QualificationsWorkExperienceRequest $request, WorkExperience $workExperience) |
|
| 56 | { |
|
| 57 | try { |
|
| 58 | $work_experience = $workExperience->create($request->all()); |
|
| 59 | } catch (Exception $e) { |
|
| 60 | return $this->response()->array(['message' => UNABLE_ADD_MESSAGE, 'status_code' => 422])->statusCode(422); |
|
| 61 | } |
|
| 62 | ||
| 63 | return $this->response()->array(['work_experience' => $work_experience, 'message' => SUCCESS_ADD_MESSAGE, 'status_code' => 201])->statusCode(201); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Delete the Profile - Qualifications - Work Experiences. |
|
| @@ 125-134 (lines=10) @@ | ||
| 122 | * |
|
| 123 | * @author Bertrand Kintanar <[email protected]> |
|
| 124 | */ |
|
| 125 | public function storeEducation(QualificationsEducationRequest $request, Education $education) |
|
| 126 | { |
|
| 127 | try { |
|
| 128 | $education = $education->create($request->except(['education_level', 'education_levels'])); |
|
| 129 | } catch (Exception $e) { |
|
| 130 | return $this->response()->array(['message' => UNABLE_ADD_MESSAGE, 'status_code' => 422])->statusCode(422); |
|
| 131 | } |
|
| 132 | ||
| 133 | return $this->response()->array(['education' => $education, 'message' => SUCCESS_ADD_MESSAGE, 'status_code' => 201])->statusCode(201); |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * Delete the Profile - Qualifications - Educations. |
|
| @@ 93-102 (lines=10) @@ | ||
| 90 | * |
|
| 91 | * @author Bertrand Kintanar <[email protected]> |
|
| 92 | */ |
|
| 93 | public function store(JobTitleRequest $request) |
|
| 94 | { |
|
| 95 | try { |
|
| 96 | $job_title = $this->job_title->create($request->all()); |
|
| 97 | } catch (Exception $e) { |
|
| 98 | return $this->response()->array(['message' => UNABLE_ADD_MESSAGE, 'status_code' => 422])->statusCode(422); |
|
| 99 | } |
|
| 100 | ||
| 101 | return $this->response()->array(['job_title' => $job_title, 'message' => SUCCESS_ADD_MESSAGE, 'status_code' => 201])->statusCode(201); |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * Setup table for custom field section. |
|