@@ 54-63 (lines=10) @@ | ||
51 | return view('training.index', compact('trainings', 'isTrainingType', 'hasTrainingType')); |
|
52 | } |
|
53 | ||
54 | public function create() |
|
55 | { |
|
56 | $this->authorize('edit'); |
|
57 | ||
58 | $users = User::skipSystem()->active()->orderBy('last_name')->get()->pluck('UserFullName', 'id'); |
|
59 | $groups = Group::orderBy('name')->get()->pluck('name', 'id'); |
|
60 | $training_types = TrainingType::whereStatus(true)->orderBy('name')->get()->pluck('name', 'id'); |
|
61 | ||
62 | return view('training.create', compact('users', 'groups', 'training_types')); |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * Store a newly created resource in storage. |
|
@@ 115-124 (lines=10) @@ | ||
112 | return view('training.show', compact('notes', 'training', 'showAll')); |
|
113 | } |
|
114 | ||
115 | public function edit(Training $training) |
|
116 | { |
|
117 | $this->authorize('edit'); |
|
118 | ||
119 | $users = User::skipSystem()->active()->orderBy('last_name')->get()->pluck('UserFullName', 'id'); |
|
120 | $groups = Group::orderBy('name')->get()->pluck('name', 'id'); |
|
121 | $training_types = TrainingType::whereStatus(true)->orderBy('name')->get()->pluck('name', 'id'); |
|
122 | ||
123 | return view('training.edit', compact('training', 'users', 'groups', 'training_types')); |
|
124 | } |
|
125 | ||
126 | public function update(Request $request, Training $training) |
|
127 | { |