@@ -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', |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | CRUD::setValidation(StoreRequest::class); |
65 | 65 | CRUD::addFields([ |
66 | - [ // Select2 |
|
66 | + [// Select2 |
|
67 | 67 | 'label' => 'User', |
68 | 68 | 'type' => 'select2', |
69 | 69 | 'name' => 'user_id', // the db column for the foreign key |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | protected function setupUpdateOperation() |
89 | 89 | { |
90 | 90 | CRUD::addFields([ |
91 | - [ // Select2 |
|
91 | + [// Select2 |
|
92 | 92 | 'label' => 'User', |
93 | 93 | 'type' => 'select2', |
94 | 94 | 'name' => 'user_id', // the db column for the foreign key |
@@ -29,10 +29,10 @@ |
||
29 | 29 | $this->crud->replaceSaveActions( |
30 | 30 | [ |
31 | 31 | 'name' => __('Save and go back'), |
32 | - 'visible' => function ($crud) { |
|
32 | + 'visible' => function($crud) { |
|
33 | 33 | return true; |
34 | 34 | }, |
35 | - 'redirect' => function ($crud, $request, $itemId) { |
|
35 | + 'redirect' => function($crud, $request, $itemId) { |
|
36 | 36 | $enrollment_id = Payment::find($itemId)->enrollment_id; |
37 | 37 | |
38 | 38 | return route('enrollment.show', ['id' => $enrollment_id]); |