feature: change password
This commit is contained in:
@@ -18,10 +18,13 @@ class AdminController extends Controller
|
||||
{
|
||||
$selectedMonth = $request->input('month', Carbon::now()->format('Y-m'));
|
||||
$search = $request->input('search');
|
||||
$status = $request->input('status', (string)User::STATUS_ACTIVE);
|
||||
$role = $request->input('role');
|
||||
$department = $request->input('department');
|
||||
$flagSend = $request->input('flag_send');
|
||||
|
||||
['users' => $users, 'topReceivedUser' => $topReceivedUser, 'topSentUser' => $topSentUser]
|
||||
= $this->adminService->getUserListWithStats($selectedMonth, $search, $flagSend);
|
||||
= $this->adminService->getUserListWithStats($selectedMonth, $search, $status, $role, $department, $flagSend);
|
||||
|
||||
if ($request->ajax() || $request->wantsJson()) {
|
||||
return response()->json([
|
||||
@@ -31,7 +34,17 @@ class AdminController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
return view('admin.users.index', compact('users', 'selectedMonth', 'topReceivedUser', 'topSentUser', 'search', 'flagSend'));
|
||||
return view('admin.users.index', compact(
|
||||
'users',
|
||||
'selectedMonth',
|
||||
'topReceivedUser',
|
||||
'topSentUser',
|
||||
'search',
|
||||
'status',
|
||||
'role',
|
||||
'department',
|
||||
'flagSend'
|
||||
));
|
||||
}
|
||||
|
||||
public function create()
|
||||
|
||||
@@ -75,6 +75,10 @@ class UserController extends Controller
|
||||
{
|
||||
$request->validate([
|
||||
'password' => 'required|min:6|confirmed',
|
||||
], [
|
||||
'password.required' => 'Mật khẩu mới không được để trống.',
|
||||
'password.min' => 'Mật khẩu mới phải có ít nhất 6 ký tự.',
|
||||
'password.confirmed' => 'Mật khẩu xác nhận không trùng khớp.',
|
||||
]);
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
Reference in New Issue
Block a user