@@ -35,12 +35,12 @@ |
||
35 | 35 | protected function addCookieToResponse($request, $response) |
36 | 36 | { |
37 | 37 | if ($this->addHttpCookie) { |
38 | - $config = config('session'); |
|
39 | - $response->headers->setCookie( |
|
40 | - new Cookie( |
|
38 | + $config = config ('session'); |
|
39 | + $response->headers->setCookie ( |
|
40 | + new Cookie ( |
|
41 | 41 | 'XSRF-TOKEN', |
42 | - $request->session()->token(), |
|
43 | - $this->availableAt(60 * $config['lifetime']), |
|
42 | + $request->session ()->token (), |
|
43 | + $this->availableAt (60 * $config['lifetime']), |
|
44 | 44 | $config['path'], |
45 | 45 | $config['domain'], |
46 | 46 | $config['secure'], |
@@ -16,15 +16,15 @@ |
||
16 | 16 | */ |
17 | 17 | public function destroy(Request $request, Course $course) |
18 | 18 | { |
19 | - $this->authorize('delete', $course); |
|
20 | - $course->delete(); |
|
19 | + $this->authorize ('delete', $course); |
|
20 | + $course->delete (); |
|
21 | 21 | |
22 | - if ($request->ajax()) { |
|
22 | + if ($request->ajax ()) { |
|
23 | 23 | return [ |
24 | 24 | 'message' => 'Course delete', |
25 | 25 | ]; |
26 | 26 | } |
27 | 27 | |
28 | - return back(); |
|
28 | + return back (); |
|
29 | 29 | } |
30 | 30 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function index() |
16 | 16 | { |
17 | - return Department::all()->map->toApiArray(); |
|
17 | + return Department::all ()->map->toApiArray (); |
|
18 | 18 | } |
19 | 19 | } |
@@ -14,21 +14,21 @@ |
||
14 | 14 | */ |
15 | 15 | public function index() |
16 | 16 | { |
17 | - $skills = Skill::with('classifications')->get(); |
|
17 | + $skills = Skill::with ('classifications')->get (); |
|
18 | 18 | $skillsArray = []; |
19 | 19 | // TODO: improve effiency of getting translations. |
20 | 20 | foreach ($skills as $skill) { |
21 | 21 | $translations = [ |
22 | 22 | 'en' => [ |
23 | - 'name' => $skill->getTranslation('name', 'en'), |
|
24 | - 'description' => $skill->getTranslation('description', 'en'), |
|
23 | + 'name' => $skill->getTranslation ('name', 'en'), |
|
24 | + 'description' => $skill->getTranslation ('description', 'en'), |
|
25 | 25 | ], |
26 | 26 | 'fr' => [ |
27 | - 'name' => $skill->getTranslation('name', 'fr'), |
|
28 | - 'description' => $skill->getTranslation('description', 'fr'), |
|
27 | + 'name' => $skill->getTranslation ('name', 'fr'), |
|
28 | + 'description' => $skill->getTranslation ('description', 'fr'), |
|
29 | 29 | ] |
30 | 30 | ]; |
31 | - $skillsArray[] = array_merge($skill->toArray(), $translations); |
|
31 | + $skillsArray[] = array_merge ($skill->toArray (), $translations); |
|
32 | 32 | } |
33 | 33 | return ['skills' => $skillsArray]; |
34 | 34 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function __construct() |
17 | 17 | { |
18 | 18 | // This applies the appropriate policy to each resource route. |
19 | - $this->authorizeResource(Manager::class, 'manager'); |
|
19 | + $this->authorizeResource (Manager::class, 'manager'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function show(Manager $manager) |
50 | 50 | { |
51 | - return response()->json($manager->toApiArray()); |
|
51 | + return response ()->json ($manager->toApiArray ()); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function showAuthenticated() |
60 | 60 | { |
61 | - $user = Auth::user(); |
|
61 | + $user = Auth::user (); |
|
62 | 62 | if ($user !== null && $user->manager !== null) { |
63 | - return response()->json($user->manager->toApiArray()); |
|
63 | + return response ()->json ($user->manager->toApiArray ()); |
|
64 | 64 | } |
65 | - return response()->json([]); |
|
65 | + return response ()->json ([]); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function update(UpdateManagerApi $request, Manager $manager) |
76 | 76 | { |
77 | - $validated = $request->validated(); |
|
78 | - $manager->fill($validated); |
|
79 | - $manager->save(); |
|
80 | - return response()->json($manager->toApiArray()); |
|
77 | + $validated = $request->validated (); |
|
78 | + $manager->fill ($validated); |
|
79 | + $manager->save (); |
|
80 | + return response ()->json ($manager->toApiArray ()); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function editAuthenticated(Request $request) |
23 | 23 | { |
24 | - $applicant = $request->user()->applicant; |
|
25 | - return redirect(route('profile.experience.edit', $applicant)); |
|
24 | + $applicant = $request->user ()->applicant; |
|
25 | + return redirect (route ('profile.experience.edit', $applicant)); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function edit(Request $request, Applicant $applicant) |
36 | 36 | { |
37 | - return view('applicant/profile_02_experience', [ |
|
37 | + return view ('applicant/profile_02_experience', [ |
|
38 | 38 | 'applicant' => $applicant, |
39 | - 'profile' => Lang::get('applicant/profile_experience'), |
|
40 | - 'work_template' => Lang::get('common/work_experience'), |
|
41 | - 'form_submit_action' => route('profile.experience.update', $applicant) |
|
39 | + 'profile' => Lang::get ('applicant/profile_experience'), |
|
40 | + 'work_template' => Lang::get ('common/work_experience'), |
|
41 | + 'form_submit_action' => route ('profile.experience.update', $applicant) |
|
42 | 42 | ]); |
43 | 43 | } |
44 | 44 | |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function update(Request $request, Applicant $applicant) |
53 | 53 | { |
54 | - $input = $request->input(); |
|
54 | + $input = $request->input (); |
|
55 | 55 | |
56 | 56 | $degrees = $input['degrees']; |
57 | 57 | |
58 | - $request->validate([ |
|
58 | + $request->validate ([ |
|
59 | 59 | 'degrees.new.*.degree_type_id' => 'required', |
60 | 60 | 'degrees.new.*.area_of_study' => 'required', |
61 | 61 | 'degrees.new.*.institution' => 'required', |
@@ -72,16 +72,16 @@ discard block |
||
72 | 72 | // Check if no degrees were resubmitted, or if this specific one wasn't. |
73 | 73 | if (!isset($degrees['old']) || |
74 | 74 | !isset($degrees['old'][$oldDegree->id])) { |
75 | - $oldDegree->delete(); |
|
75 | + $oldDegree->delete (); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | 79 | // Save new degrees. |
80 | 80 | if (isset($degrees['new'])) { |
81 | 81 | foreach ($degrees['new'] as $degreeInput) { |
82 | - $degree = new Degree(); |
|
82 | + $degree = new Degree (); |
|
83 | 83 | $degree->applicant_id = $applicant->id; |
84 | - $degree->fill([ |
|
84 | + $degree->fill ([ |
|
85 | 85 | 'degree_type_id' => $degreeInput['degree_type_id'], |
86 | 86 | 'area_of_study' => $degreeInput['area_of_study'], |
87 | 87 | 'institution' => $degreeInput['institution'], |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'end_date' => $degreeInput['end_date'], |
91 | 91 | 'blockcert_url' => $degreeInput['blockcert_url'], |
92 | 92 | ]); |
93 | - $degree->save(); |
|
93 | + $degree->save (); |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | if (isset($degrees['old'])) { |
99 | 99 | foreach ($degrees['old'] as $id => $degreeInput) { |
100 | 100 | // Ensure this degree belongs to this applicant. |
101 | - $degree = $applicant->degrees->firstWhere('id', $id); |
|
101 | + $degree = $applicant->degrees->firstWhere ('id', $id); |
|
102 | 102 | if ($degree != null) { |
103 | - $degree->fill([ |
|
103 | + $degree->fill ([ |
|
104 | 104 | 'degree_type_id' => $degreeInput['degree_type_id'], |
105 | 105 | 'area_of_study' => $degreeInput['area_of_study'], |
106 | 106 | 'institution' => $degreeInput['institution'], |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | 'end_date' => $degreeInput['end_date'], |
110 | 110 | 'blockcert_url' => $degreeInput['blockcert_url'], |
111 | 111 | ]); |
112 | - $degree->save(); |
|
112 | + $degree->save (); |
|
113 | 113 | } else { |
114 | - Log::warning("Applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
114 | + Log::warning ("Applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | 119 | $courses = $input['courses']; |
120 | 120 | |
121 | - $request->validate([ |
|
121 | + $request->validate ([ |
|
122 | 122 | 'courses.new.*.name' => 'required', |
123 | 123 | 'courses.new.*.institution' => 'required', |
124 | 124 | 'courses.new.*.course_status_id' => 'required', |
@@ -133,23 +133,23 @@ discard block |
||
133 | 133 | // Check if no courses were resubmitted, or if this specific one wasn't. |
134 | 134 | if (!isset($courses['old']) || |
135 | 135 | !isset($courses['old'][$oldCourse->id])) { |
136 | - $oldCourse->delete(); |
|
136 | + $oldCourse->delete (); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | 140 | // Save new courses. |
141 | 141 | if (isset($courses['new'])) { |
142 | 142 | foreach ($courses['new'] as $courseInput) { |
143 | - $course = new Course(); |
|
143 | + $course = new Course (); |
|
144 | 144 | $course->applicant_id = $applicant->id; |
145 | - $course->fill([ |
|
145 | + $course->fill ([ |
|
146 | 146 | 'name' => $courseInput['name'], |
147 | 147 | 'institution' => $courseInput['institution'], |
148 | 148 | 'course_status_id' => $courseInput['course_status_id'], |
149 | 149 | 'start_date' => $courseInput['start_date'], |
150 | 150 | 'end_date' => $courseInput['end_date'] |
151 | 151 | ]); |
152 | - $course->save(); |
|
152 | + $course->save (); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
@@ -157,25 +157,25 @@ discard block |
||
157 | 157 | if (isset($courses['old'])) { |
158 | 158 | foreach ($courses['old'] as $id => $courseInput) { |
159 | 159 | // Ensure this course belongs to this applicant. |
160 | - $course = $applicant->courses->firstWhere('id', $id); |
|
160 | + $course = $applicant->courses->firstWhere ('id', $id); |
|
161 | 161 | if ($course != null) { |
162 | - $course->fill([ |
|
162 | + $course->fill ([ |
|
163 | 163 | 'name' => $courseInput['name'], |
164 | 164 | 'institution' => $courseInput['institution'], |
165 | 165 | 'course_status_id' => $courseInput['course_status_id'], |
166 | 166 | 'start_date' => $courseInput['start_date'], |
167 | 167 | 'end_date' => $courseInput['end_date'] |
168 | 168 | ]); |
169 | - $course->save(); |
|
169 | + $course->save (); |
|
170 | 170 | } else { |
171 | - Log::warning("Applicant $applicant->id attempted to update course with invalid id: $id"); |
|
171 | + Log::warning ("Applicant $applicant->id attempted to update course with invalid id: $id"); |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
176 | 176 | $work_experiences = $input['work_experiences']; |
177 | 177 | |
178 | - $request->validate([ |
|
178 | + $request->validate ([ |
|
179 | 179 | 'work_experiences.new.*.role' => 'required', |
180 | 180 | 'work_experiences.new.*.company' => 'required', |
181 | 181 | 'work_experiences.new.*.description' => 'required', |
@@ -190,23 +190,23 @@ discard block |
||
190 | 190 | // Check if no work_experiences were resubmitted, or if this specific one wasn't. |
191 | 191 | if (!isset($work_experiences['old']) || |
192 | 192 | !isset($work_experiences['old'][$oldWorkExperience->id])) { |
193 | - $oldWorkExperience->delete(); |
|
193 | + $oldWorkExperience->delete (); |
|
194 | 194 | } |
195 | 195 | } |
196 | 196 | |
197 | 197 | // Save new work_experiences. |
198 | 198 | if (isset($work_experiences['new'])) { |
199 | 199 | foreach ($work_experiences['new'] as $workExperienceInput) { |
200 | - $workExperience = new WorkExperience(); |
|
200 | + $workExperience = new WorkExperience (); |
|
201 | 201 | $workExperience->applicant_id = $applicant->id; |
202 | - $workExperience->fill([ |
|
202 | + $workExperience->fill ([ |
|
203 | 203 | 'role' => $workExperienceInput['role'], |
204 | 204 | 'company' => $workExperienceInput['company'], |
205 | 205 | 'description' => $workExperienceInput['description'], |
206 | 206 | 'start_date' => $workExperienceInput['start_date'], |
207 | 207 | 'end_date' => $workExperienceInput['end_date'] |
208 | 208 | ]); |
209 | - $workExperience->save(); |
|
209 | + $workExperience->save (); |
|
210 | 210 | } |
211 | 211 | } |
212 | 212 | |
@@ -214,22 +214,22 @@ discard block |
||
214 | 214 | if (isset($work_experiences['old'])) { |
215 | 215 | foreach ($work_experiences['old'] as $id => $workExperienceInput) { |
216 | 216 | // Ensure this work_experience belongs to this applicant. |
217 | - $workExperience = $applicant->work_experiences->firstWhere('id', $id); |
|
217 | + $workExperience = $applicant->work_experiences->firstWhere ('id', $id); |
|
218 | 218 | if ($workExperience != null) { |
219 | - $workExperience->fill([ |
|
219 | + $workExperience->fill ([ |
|
220 | 220 | 'role' => $workExperienceInput['role'], |
221 | 221 | 'company' => $workExperienceInput['company'], |
222 | 222 | 'description' => $workExperienceInput['description'], |
223 | 223 | 'start_date' => $workExperienceInput['start_date'], |
224 | 224 | 'end_date' => $workExperienceInput['end_date'] |
225 | 225 | ]); |
226 | - $workExperience->save(); |
|
226 | + $workExperience->save (); |
|
227 | 227 | } else { |
228 | - Log::warning("Applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
228 | + Log::warning ("Applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | } |
232 | 232 | |
233 | - return redirect(route('profile.experience.edit', $applicant)); |
|
233 | + return redirect (route ('profile.experience.edit', $applicant)); |
|
234 | 234 | } |
235 | 235 | } |
@@ -16,15 +16,15 @@ |
||
16 | 16 | */ |
17 | 17 | public function destroy(Request $request, Degree $degree) |
18 | 18 | { |
19 | - $this->authorize('delete', $degree); |
|
20 | - $degree->delete(); |
|
19 | + $this->authorize ('delete', $degree); |
|
20 | + $degree->delete (); |
|
21 | 21 | |
22 | - if ($request->ajax()) { |
|
22 | + if ($request->ajax ()) { |
|
23 | 23 | return [ |
24 | 24 | 'message' => 'Degree deleted', |
25 | 25 | ]; |
26 | 26 | } |
27 | 27 | |
28 | - return back(); |
|
28 | + return back (); |
|
29 | 29 | } |
30 | 30 | } |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | * description // Question description text |
42 | 42 | */ |
43 | 43 | |
44 | - return view( |
|
44 | + return view ( |
|
45 | 45 | 'manager/applicant_profile', |
46 | 46 | [ |
47 | 47 | // Localization Strings. |
48 | - 'profile' => Lang::get('manager/applicant_profile'), // Change text |
|
48 | + 'profile' => Lang::get ('manager/applicant_profile'), // Change text |
|
49 | 49 | // User Data. |
50 | 50 | 'user' => $applicant->user, |
51 | 51 | 'applicant' => $applicant, |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function editAuthenticated(Request $request) |
64 | 64 | { |
65 | - $applicant = $request->user()->applicant; |
|
66 | - return redirect(route('profile.about.edit', $applicant)); |
|
65 | + $applicant = $request->user ()->applicant; |
|
66 | + return redirect (route ('profile.about.edit', $applicant)); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function edit(Request $request, Applicant $applicant) |
77 | 77 | { |
78 | - $profileQuestions = ApplicantProfileQuestion::all(); |
|
78 | + $profileQuestions = ApplicantProfileQuestion::all (); |
|
79 | 79 | |
80 | - $profileText = Lang::get('applicant/applicant_profile'); |
|
80 | + $profileText = Lang::get ('applicant/applicant_profile'); |
|
81 | 81 | |
82 | 82 | $profileQuestionForms = []; |
83 | 83 | foreach ($profileQuestions as $question) { |
84 | 84 | $answerObj = $applicant->applicant_profile_answers |
85 | - ->where('applicant_profile_question_id', $question->id)->first(); |
|
85 | + ->where ('applicant_profile_question_id', $question->id)->first (); |
|
86 | 86 | $answer = $answerObj ? $answerObj->answer : null; |
87 | 87 | |
88 | 88 | $formValues = [ |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | 'answer_label' => $profileText['about_section']['answer_label'], |
94 | 94 | 'input_name' => $this->answerFormInputName.'['.$question->id.']' |
95 | 95 | ]; |
96 | - array_push($profileQuestionForms, $formValues); |
|
96 | + array_push ($profileQuestionForms, $formValues); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $linkedInUrlPattern = LinkedInUrlRule::PATTERN; |
100 | 100 | $twitterHandlePattern = TwitterHandleRule::PATTERN; |
101 | 101 | |
102 | - return view( |
|
102 | + return view ( |
|
103 | 103 | 'applicant/profile_01_about', |
104 | 104 | [ |
105 | 105 | // Localized strings. |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'user' => $applicant->user, |
111 | 111 | 'applicant' => $applicant, |
112 | 112 | 'profile_photo_url' => '/images/user.png', // TODO: get real photos. |
113 | - 'form_submit_action' => route('profile.about.update', $applicant), |
|
113 | + 'form_submit_action' => route ('profile.about.update', $applicant), |
|
114 | 114 | 'linkedInUrlPattern' => $linkedInUrlPattern, |
115 | 115 | 'twitterHandlePattern' => $twitterHandlePattern, |
116 | 116 | ] |
@@ -126,42 +126,42 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function update(Request $request, Applicant $applicant) |
128 | 128 | { |
129 | - $questions = ApplicantProfileQuestion::all(); |
|
129 | + $questions = ApplicantProfileQuestion::all (); |
|
130 | 130 | |
131 | - $validator = new UpdateApplicationProfileValidator($applicant); |
|
132 | - $validator->validate($request->all()); |
|
131 | + $validator = new UpdateApplicationProfileValidator ($applicant); |
|
132 | + $validator->validate ($request->all ()); |
|
133 | 133 | |
134 | 134 | foreach ($questions as $question) { |
135 | - $answerName = $this->answerFormInputName . '.' . $question->id; |
|
136 | - if ($request->has($answerName)) { |
|
137 | - $answer = ApplicantProfileAnswer::where( |
|
135 | + $answerName = $this->answerFormInputName.'.'.$question->id; |
|
136 | + if ($request->has ($answerName)) { |
|
137 | + $answer = ApplicantProfileAnswer::where ( |
|
138 | 138 | [ |
139 | 139 | 'applicant_id' => $applicant->id, |
140 | 140 | 'applicant_profile_question_id' => $question->id |
141 | 141 | ] |
142 | - )->first(); |
|
142 | + )->first (); |
|
143 | 143 | if ($answer == null) { |
144 | - $answer = new ApplicantProfileAnswer(); |
|
145 | - $answer->applicant_id =$applicant->id; |
|
144 | + $answer = new ApplicantProfileAnswer (); |
|
145 | + $answer->applicant_id = $applicant->id; |
|
146 | 146 | $answer->applicant_profile_question_id = $question->id; |
147 | 147 | } |
148 | - $answer->answer = $request->input($answerName); |
|
149 | - $answer->save(); |
|
148 | + $answer->answer = $request->input ($answerName); |
|
149 | + $answer->save (); |
|
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
153 | - $input = $request->input(); |
|
154 | - $applicant->fill( |
|
153 | + $input = $request->input (); |
|
154 | + $applicant->fill ( |
|
155 | 155 | [ |
156 | 156 | 'tagline' => $input['tagline'], |
157 | 157 | 'twitter_username' => $input['twitter_username'], |
158 | 158 | 'linkedin_url' => $input['linkedin_url'], |
159 | 159 | ] |
160 | 160 | ); |
161 | - $applicant->save(); |
|
161 | + $applicant->save (); |
|
162 | 162 | |
163 | 163 | $user = $applicant->user; |
164 | - $user->fill( |
|
164 | + $user->fill ( |
|
165 | 165 | [ |
166 | 166 | 'first_name' => $input['profile_first_name'], |
167 | 167 | 'last_name' => $input['profile_last_name'], |
@@ -169,10 +169,10 @@ discard block |
||
169 | 169 | ] |
170 | 170 | ); |
171 | 171 | if ($input['new_password']) { |
172 | - $user->password = Hash::make($input['new_password']); // TODO: change password in seperate form! |
|
172 | + $user->password = Hash::make ($input['new_password']); // TODO: change password in seperate form! |
|
173 | 173 | } |
174 | - $user->save(); |
|
174 | + $user->save (); |
|
175 | 175 | |
176 | - return redirect()->route('profile.about.edit', $applicant); |
|
176 | + return redirect ()->route ('profile.about.edit', $applicant); |
|
177 | 177 | } |
178 | 178 | } |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | public function index(Request $request) |
18 | 18 | { |
19 | 19 | $notificationsArray = []; |
20 | - if ($request->has('job_poster_id') && $request->user() != null) { |
|
21 | - $jobPosterId = $request->input('job_poster_id'); |
|
22 | - $notifications = AssessmentPlanNotification::where('job_poster_id', $jobPosterId)->get(); |
|
20 | + if ($request->has ('job_poster_id') && $request->user () != null) { |
|
21 | + $jobPosterId = $request->input ('job_poster_id'); |
|
22 | + $notifications = AssessmentPlanNotification::where ('job_poster_id', $jobPosterId)->get (); |
|
23 | 23 | foreach ($notifications as $notification) { |
24 | - if ($request->user()->can('view', $notification)) { |
|
25 | - $notificationsArray[] = $notification->toArray(); |
|
24 | + if ($request->user ()->can ('view', $notification)) { |
|
25 | + $notificationsArray[] = $notification->toArray (); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | } |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function show(AssessmentPlanNotification $assessmentPlanNotification) |
39 | 39 | { |
40 | - $this->authorize('view', $assessmentPlanNotification); |
|
41 | - return $assessmentPlanNotification->toArray(); |
|
40 | + $this->authorize ('view', $assessmentPlanNotification); |
|
41 | + return $assessmentPlanNotification->toArray (); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function update(Request $request, AssessmentPlanNotification $assessmentPlanNotification) |
53 | 53 | { |
54 | - $this->authorize('update', $assessmentPlanNotification); |
|
55 | - $assessmentPlanNotification->fill([ |
|
56 | - 'acknowledged' => $request->input('acknowledged') |
|
54 | + $this->authorize ('update', $assessmentPlanNotification); |
|
55 | + $assessmentPlanNotification->fill ([ |
|
56 | + 'acknowledged' => $request->input ('acknowledged') |
|
57 | 57 | ]); |
58 | - $assessmentPlanNotification->save(); |
|
58 | + $assessmentPlanNotification->save (); |
|
59 | 59 | |
60 | 60 | return [ |
61 | 61 | 'success' => "Successfully updated assessment plan notification $assessmentPlanNotification->id", |
62 | - 'assessment_plan_notification' => $assessmentPlanNotification->toArray(), |
|
62 | + 'assessment_plan_notification' => $assessmentPlanNotification->toArray (), |
|
63 | 63 | ]; |
64 | 64 | } |
65 | 65 | |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function destroy(AssessmentPlanNotification $assessmentPlanNotification) |
73 | 73 | { |
74 | - $this->authorize('delete', $assessmentPlanNotification); |
|
75 | - $assessmentPlanNotification->delete(); |
|
74 | + $this->authorize ('delete', $assessmentPlanNotification); |
|
75 | + $assessmentPlanNotification->delete (); |
|
76 | 76 | |
77 | 77 | return [ |
78 | 78 | 'success' => "Successfully deleted assessment plan notification $assessmentPlanNotification->id" |