| @@ 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 | /** |
|
| @@ 174-186 (lines=13) @@ | ||
| 171 | * |
|
| 172 | * @return \Illuminate\Http\RedirectResponse |
|
| 173 | */ |
|
| 174 | public function assign(AssignTrainingRequest $request, $trainingID) |
|
| 175 | { |
|
| 176 | $this->authorize('edit'); |
|
| 177 | ||
| 178 | $data = $request->all(); |
|
| 179 | $data['training_id'] = $trainingID; |
|
| 180 | ||
| 181 | $this->createTrainingNotes($data); |
|
| 182 | ||
| 183 | Notification::container()->success('Training was assigned to the user(s).'); |
|
| 184 | ||
| 185 | return redirect()->action('TrainingController@show', $trainingID); |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * Provide the form data to the bulk update a training form. |
|