| @@ 173-185 (lines=13) @@ | ||
| 170 | * |
|
| 171 | * @return \Illuminate\Http\RedirectResponse |
|
| 172 | */ |
|
| 173 | public function assign(AssignTrainingRequest $request, $trainingID) |
|
| 174 | { |
|
| 175 | $this->authorize('edit'); |
|
| 176 | ||
| 177 | $data = $request->all(); |
|
| 178 | $data['training_id'] = $trainingID; |
|
| 179 | ||
| 180 | $this->createTrainingNotes($data); |
|
| 181 | ||
| 182 | Notification::container()->success('Training was assigned to the user(s).'); |
|
| 183 | ||
| 184 | return redirect()->action('TrainingController@show', $trainingID); |
|
| 185 | } |
|
| 186 | ||
| 187 | /** |
|
| 188 | * Provide the form data to the bulk update a training form. |
|
| @@ 89-96 (lines=8) @@ | ||
| 86 | * |
|
| 87 | * @return \Illuminate\Http\Response |
|
| 88 | */ |
|
| 89 | public function update(StoreTrainingTypeRequest $request, TrainingType $trainingtype) |
|
| 90 | { |
|
| 91 | $this->authorize('edit'); |
|
| 92 | $data = $request->all(); |
|
| 93 | $trainingtype->update($data); |
|
| 94 | Notification::container()->success('Training Type Updated'); |
|
| 95 | ||
| 96 | return redirect()->action('TrainingTypeController@show', $trainingtype->id); |
|
| 97 | } |
|
| 98 | ||
| 99 | /** |
|