Skip to content

Commit 3873be1

Browse files
committed
fixed getting user list for modal selects when deleting a user
1 parent ec39e05 commit 3873be1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Http/Controllers/UsersController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public function __construct(
4747
*/
4848
public function index()
4949
{
50-
return view('users.index')->withUsers($this->users);
50+
return view('users.index')
51+
->with('users', User::select('id', 'name')->orderBy('name')->get());
5152
}
5253

5354
public function users()

0 commit comments

Comments
 (0)