@@ 20-28 (lines=9) @@ | ||
17 | return view('duty.index', compact('duties')); |
|
18 | } |
|
19 | ||
20 | public function create() |
|
21 | { |
|
22 | $this->authorize('edit'); |
|
23 | ||
24 | $users = User::active()->skipSystem()->get()->sortBy('userFullName')->pluck('userFullName', 'id'); |
|
25 | $groups = Group::all()->pluck('name', 'id'); |
|
26 | ||
27 | return view('duty.create', compact('users', 'groups')); |
|
28 | } |
|
29 | ||
30 | public function store(DutyRequest $request) |
|
31 | { |
@@ 59-67 (lines=9) @@ | ||
56 | return view('user.index', compact('users', 'userStatus')); |
|
57 | } |
|
58 | ||
59 | public function create() |
|
60 | { |
|
61 | $this->authorize('edit'); |
|
62 | ||
63 | $supervisors = User::skipSystem()->active()->orderBy('last_name')->get()->pluck('userFullName', 'id')->toArray(); |
|
64 | $groups = Group::all(); |
|
65 | ||
66 | return view('user.create', compact('supervisors', 'groups')); |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * @param StoreUserRequest $request |
|
@@ 135-143 (lines=9) @@ | ||
132 | 'trainings', 'activityLog', 'training_blocks', 'training_user_types')); |
|
133 | } |
|
134 | ||
135 | public function edit(User $user) |
|
136 | { |
|
137 | $this->authorize('edit'); |
|
138 | ||
139 | $supervisors = User::skipSystem()->active()->orderBy('last_name')->get()->pluck('userFullName', 'id')->toArray(); |
|
140 | $groups = Group::all(); |
|
141 | ||
142 | return view('user.edit', compact('user', 'supervisors', 'groups')); |
|
143 | } |
|
144 | ||
145 | public function update(UpdateUserRequest $request, User $user) |
|
146 | { |