-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View recently joined users in admin area #905
Conversation
- This button filters and displays users who have recently joined within the last 7 days. - The button shows a badge with the count of such users. - This enhancement makes it easier for admins to quickly access and review the most recently joined users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Please put the search input field first, then the "recently joined button" and then the "new user" button with a pull-right
class.
Also, instead of adding a new view, you can filter the list of users in the same view. To do this you can add a query parameter (e.g. recent=1
) to the URL. The button URL would then be href="{{route('admin-users-recent')}}?recent=1"
. In the controller you can get the parameter with $request->get('recent')
. If the parameter is true, you can conditionally add a filter to the user query like this:
->when($request->get('recent'), fn ($query) => $query->where('created_at', '>=', now()->subWeek()))
If the user list is filtered, you can add a btn-info
class to the "recently joined" button, to make the state clear.
search input, "recently joined" button, "new user" button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've added a final touch by making the "recent users" button itself btn-info active
so there is no need for a separate "x" button. Also the "new user" button is now pull-right
.
Introduces a new feature to view a list of users who have joined within the last 7 days.
Added a new route (users/recent) and corresponding controller method (getRecentUsers) to fetch and display users who recently joined.
In view added a "Recently Joined" button in the admin area, which highlights the number of users who joined recently and navigates to the new view.
Created a new Blade template to display the recent users, including account creation date.
Resolves #691