reuse form

This commit is contained in:
antv
2026-07-01 16:57:34 +07:00
parent 4e4d03d62a
commit f1858f8f0f
34 changed files with 1273 additions and 681 deletions
+12 -2
View File
@@ -16,11 +16,21 @@ class AdminController extends Controller
public function index(Request $request)
{
$selectedMonth = $request->input('month', Carbon::now()->format('Y-m'));
$search = $request->input('search');
$flagSend = $request->input('flag_send');
['users' => $users, 'topReceivedUser' => $topReceivedUser, 'topSentUser' => $topSentUser]
= $this->adminService->getUserListWithStats($selectedMonth);
= $this->adminService->getUserListWithStats($selectedMonth, $search, $flagSend);
return view('admin.users.index', compact('users', 'selectedMonth', 'topReceivedUser', 'topSentUser'));
if ($request->ajax() || $request->wantsJson()) {
return response()->json([
'title' => view('admin.users.partials.title', compact('selectedMonth'))->render(),
'stats' => view('admin.users.partials.stats', compact('topReceivedUser', 'topSentUser'))->render(),
'table' => view('admin.users.partials.table', compact('users'))->render(),
]);
}
return view('admin.users.index', compact('users', 'selectedMonth', 'topReceivedUser', 'topSentUser', 'search', 'flagSend'));
}
public function create()