Eventify gives administrators full control over the user accounts registered on the platform. From theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/eventify-app/llms.txt
Use this file to discover all available pages before exploring further.
/dashboard/admin/users section, an admin can inspect every account in the system, onboard new users by filling in their credentials and assigning a role, update any existing account’s details (including resetting their password), and permanently remove accounts that are no longer needed. All of this is handled by the UserController, which sits behind both the auth and role:admin middleware layers.
Access
User management routes are nested inside the/dashboard/admin prefix group, which applies middleware('role:admin') on top of the outer ['auth', 'role:admin|user'] guard. Only accounts whose role label is admin can reach any of the endpoints below — all others receive a 403 Unauthorized response.
Route Reference
| Method | Path | Controller Action | Description |
|---|---|---|---|
GET | /dashboard/admin/users | index | List all users with their roles |
GET | /dashboard/admin/users/create | create | Show the user creation form |
POST | /dashboard/admin/users | store | Persist a new user account |
GET | /dashboard/admin/users/{id}/edit | edit | Show the edit form for a user |
PUT | /dashboard/admin/users/{id} | update | Apply updates to an existing user |
DELETE | /dashboard/admin/users/{id} | destroy | Permanently delete a user |
Listing Users
GET /dashboard/admin/users fetches every user record in the database and eager-loads their associated Role to avoid N+1 queries in the management view.
$user->role->name and $user->role->label without triggering additional queries.
Creating a User
Open the creation form
Navigate to
GET /dashboard/admin/users/create. The controller loads all available roles from the database and passes them to the view so the admin can pick one from a drop-down.Submit the form
The form posts to
POST /dashboard/admin/users. The store method reads the four required fields, hashes the plain-text password using Hash::make(), and saves the record.Required Fields
| Field | Type | Notes |
|---|---|---|
name | string | Display name for the user |
email | string | Must be unique in the users table |
password | string | Stored as a bcrypt hash via Hash::make() |
role_id | integer | Foreign key referencing the roles table |
The
role_id column defaults to 2 (the user role) at the database level, but the creation form always requires the admin to make an explicit selection, so the default is a safety net rather than an intended workflow.Editing a User
Open the edit form
Navigate to
GET /dashboard/admin/users/{id}/edit. The controller fetches the target user by primary key and loads all roles for the role selector.Deleting a User
Sending aDELETE request to /dashboard/admin/users/{id} permanently removes the user record from the database. The controller locates the user by ID, calls delete(), then redirects back to the user list.
User Model Reference
TheUser model’s $fillable array and its relationships are shown below for reference.