@@ -226,8 +226,8 @@ |
||
226 | 226 | $user = Student::where('user_id', $this->guard()->user()->id)->first(); |
227 | 227 | |
228 | 228 | $user |
229 | - ->addMedia($request->fileToUpload) |
|
230 | - ->toMediaCollection('profile-picture'); |
|
229 | + ->addMedia($request->fileToUpload) |
|
230 | + ->toMediaCollection('profile-picture'); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | // if the user has been selected for a forced update, move to the next step |
@@ -163,9 +163,9 @@ |
||
163 | 163 | // add photo |
164 | 164 | |
165 | 165 | $student |
166 | - ->addMediaFromBase64($request->data['userPicture']) |
|
167 | - ->usingFileName('profilePicture.jpg') |
|
168 | - ->toMediaCollection('profile-picture'); |
|
166 | + ->addMediaFromBase64($request->data['userPicture']) |
|
167 | + ->usingFileName('profilePicture.jpg') |
|
168 | + ->toMediaCollection('profile-picture'); |
|
169 | 169 | |
170 | 170 | Log::info('Profile picture added to the student profile'); |
171 | 171 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'profession' => 'required', |
54 | 54 | 'institution' => 'required', |
55 | 55 | 'userPicture' => 'required', |
56 | - function ($attribute, $value, $fail) { |
|
56 | + function($attribute, $value, $fail) { |
|
57 | 57 | $size = strlen(base64_decode($value)); |
58 | 58 | |
59 | 59 | if ($size > 3145728) { |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | |
63 | 63 | $img = imagecreatefromstring($value); |
64 | 64 | |
65 | - if (! $img) { |
|
65 | + if (!$img) { |
|
66 | 66 | $fail($attribute.'Invalid image'); |
67 | 67 | } |
68 | 68 | |
69 | 69 | $size = getimagesizefromstring($value); |
70 | 70 | |
71 | - if (! $size || ($size[0] == 0) || ($size[1] == 0) || ! $size['mime']) { |
|
71 | + if (!$size || ($size[0] == 0) || ($size[1] == 0) || !$size['mime']) { |
|
72 | 72 | $fail($attribute.'is invalid'); |
73 | 73 | } |
74 | 74 | }, |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | { |
122 | 122 | |
123 | 123 | // if registration is closed, deny access |
124 | - if (! config('backpack.base.registration_open')) { |
|
124 | + if (!config('backpack.base.registration_open')) { |
|
125 | 125 | abort(403, trans('backpack::base.registration_closed')); |
126 | 126 | } |
127 | 127 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $course = Course::findOrFail($request->input('course_id')); |
55 | 55 | $grade_type = GradeType::findOrFail($request->input('grade_type_id')); |
56 | 56 | |
57 | - if (! $course->grade_type->has($grade_type->id)) { |
|
57 | + if (!$course->grade_type->has($grade_type->id)) { |
|
58 | 58 | $course->grade_type()->attach($grade_type->id); |
59 | 59 | } |
60 | 60 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | ->where('course_id', $course->id) |
77 | 77 | ->get(); |
78 | 78 | |
79 | - $skills = $course->skills->map(function ($skill, $key) use ($student_skills) { |
|
79 | + $skills = $course->skills->map(function($skill, $key) use ($student_skills) { |
|
80 | 80 | $skill['status'] = $student_skills->where('skill_id', $skill->id)->first()->skill_scale_id ?? null; |
81 | 81 | |
82 | 82 | return $skill; |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $period = Period::get_default_period(); |
40 | 40 | |
41 | - if (! isset($request->period)) { |
|
41 | + if (!isset($request->period)) { |
|
42 | 42 | $startperiod = Period::find(Config::where('name', 'first_period')->first()->value); |
43 | 43 | } else { |
44 | 44 | $startperiod = Period::find($request->period); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | public function update(Contact $contact, Request $request) |
58 | 58 | { |
59 | 59 | // check if the user is allowed to edit the contact |
60 | - if (! backpack_user()->can('update', $contact)) { |
|
60 | + if (!backpack_user()->can('update', $contact)) { |
|
61 | 61 | abort(403); |
62 | 62 | } |
63 | 63 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | public function edit(Contact $contact) |
96 | 96 | { |
97 | 97 | // check if the user is allowed to edit the contact |
98 | - if (! backpack_user()->can('update', $contact)) { |
|
98 | + if (!backpack_user()->can('update', $contact)) { |
|
99 | 99 | abort(403); |
100 | 100 | } |
101 | 101 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | CRUD::addFields([ |
55 | 55 | ['name' => 'name', 'label' => 'Name', 'type' => 'text'], |
56 | 56 | ['name' => 'total', 'label' => 'Total', 'type' => 'text'], |
57 | - [ // Select |
|
57 | + [// Select |
|
58 | 58 | 'label' => 'Category', |
59 | 59 | 'type' => 'select', |
60 | 60 | 'name' => 'grade_type_category_id', // the db column for the foreign key |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->crud->allowAccess('showstudentphotoroster'); |
33 | 33 | $this->crud->setOperationSetting('setFromDb', true); |
34 | 34 | |
35 | - $this->crud->operation('showstudentphotoroster', function () { |
|
35 | + $this->crud->operation('showstudentphotoroster', function() { |
|
36 | 36 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
37 | 37 | }); |
38 | 38 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | 'label' => trans('backpack::permissionmanager.email'), |
42 | 42 | 'type' => 'email', |
43 | 43 | ], |
44 | - [ // n-n relationship (with pivot table) |
|
44 | + [// n-n relationship (with pivot table) |
|
45 | 45 | 'label' => trans('backpack::permissionmanager.roles'), // Table column heading |
46 | 46 | 'type' => 'select_multiple', |
47 | 47 | 'name' => 'roles', // the method that defines the relationship in your Model |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | 'label' => trans('backpack::permissionmanager.role'), |
61 | 61 | ], |
62 | 62 | config('permission.models.role')::all()->pluck('name', 'id')->toArray(), |
63 | - function ($value) { // if the filter is active |
|
64 | - $this->crud->addClause('whereHas', 'roles', function ($query) use ($value) { |
|
63 | + function($value) { // if the filter is active |
|
64 | + $this->crud->addClause('whereHas', 'roles', function($query) use ($value) { |
|
65 | 65 | $query->where('role_id', '=', $value); |
66 | 66 | }); |
67 | 67 | } |
@@ -114,12 +114,12 @@ discard block |
||
114 | 114 | protected function addFields() |
115 | 115 | { |
116 | 116 | $this->crud->addFields([ |
117 | - [ // Select2 |
|
117 | + [// Select2 |
|
118 | 118 | 'label' => trans('firstname'), |
119 | 119 | 'type' => 'text', |
120 | 120 | 'name' => 'firstname', |
121 | 121 | ], |
122 | - [ // Select2 |
|
122 | + [// Select2 |
|
123 | 123 | 'label' => trans('lastname'), |
124 | 124 | 'type' => 'text', |
125 | 125 | 'name' => 'lastname', |