Registrations
Purpose
Suppose there are 10,000 users who have registered in VaahCMS and there might be the possibility that
only few of them will be the verified users.
The main purpose of Registrations method is to prevent users
tables from being filled with unnecessary front-end registrations.
Using this method we identify the actual user before saving their details into users
table. Once the user is verified then their details will be saved in the users
table in the database.
The Registration
page will display all the registered Users
and a form to create and update the Users
with the following features:
- Create New Registration
- Edit/Update the details of already exists
Registration
. - Deleting exists
Registration
. - Deleting temporary/Trashing already exists
Registration
. - List All existing
Registration
. - Filtering the
Registration
list by searching using differentfields
. - Filtering the
Registration
list by different status, trashedRegistration
. - Sorting the
Registration
with ascending/descending order. - Clone the
Registration
details. - Autofill the
Registration
field. - Bulk Actions to status change,trash,delete
Features & Demos
Create a User
In VaahCMS there are two methods of creating a user
- From Registrations
- From Users
Follow below image for reference:
You will get to know about both these methods one by one.
Method 1 : From Registrations
There are two methods to create a user from Registrations
.
We will discuss both these methods one by one.
1. From Backend
To create a new user from this method, click on Registrations
link in the side bar.
Follow below image for reference:
You will be able to see the list of registered users along with create
button. You just need to click on the Create
button in the top right corner. When you click on Create
button you should be able to see a registration
form.
Follow below image for reference:
You need to make sure status column of that user is selected as
User Created
Once you fill the form and click on Create & New
button, a new user will be created in vh_registrations
table .
Since the User
is verified one so their details will be added in Users
table also.
Follow below image for reference:
2. From Frontend
In this method a user fills the Registration
form from following url:
<project-url>/signup/
Follow below image for reference:
Once they fill the required details and click on Sign Up
button an email verification link will be sent to the user and the details will be saved in registrations
table.
Follow below image for reference:
Users need to click on Activate
button link to activate their account.
Once their account has been activated it will create a user in users
table and they will be redirected to the login page.
Follow below images for references:
Login page
Registrations list
Users list
Method 2 : From Users
To know more about this method, click here
Edit/Update the details of already exists Users
- To update the details of
Registration
click on thepencil
button and change the input field value.
Deleting exists Users
-To deleting the Registration
there are 2 way to delete Registration
-
- from the
view/form
(edit) page.
To delete theRegistration
just click on theview
button and click on the down arrow button. there is aDelete
button option. - from the
User
list and select the deleteaction
.
To delete theRegistration
first select the user and click on thedown arrow
button then click on theDelete
option.
Deleting temporary/Trashing already exists Registration
- To deleting temporary the
Registration
there are 2 way to temporary delete theRegistration
-
- from the
view/form
(edit) page.
To trash theRegistration
just click on theview
button and click on the down arrow button. there is aTrash
button option. - from the
Registration
list and selecting thetrash
action.
To trash theRegistration
first select the user and click on thedown arrow
button then click on theTrash
option.
List All existing Registration
- list of the
Registration
who are already exist will be shown-
Filtering the Registration
list by searching using different fields
- Filtering the
Registration
list by searching with fields like first name,middle name,last name,email id,user's id
etc.
Filtering the Registration
list by different status of Registration
, trashed Registration
- Filtering the
Registration
list byRegistration
different status(email verification pending, user created, email verified) and by including/excluding the trashedRegistration
.
To filter the details. Click on thefilter
button. you get a dialog box that shows all filter options. also, you can reset the filter by clicking on the filter button.
Sorting the Registration
with ascending/descending order
- List can be sort in different way, like by selecting the order(Ascending/Descending) and by list's each column's different order
Clone the Registration
details
- Already exist fields data can be cloned at the time of
create a new Registration
andupdating Registration
details, in order tocreate a new Registration
with similar data.
When you choose theCreate & clone
option at the time of creating a user. So, it will create the user, but the input field will not be blank after creating the user.
Autofill the Registration
field
- Some field can be auto filled by dummy data/random data on selecting the
fill
option , at the time ofcreate a new Registration
orupdating Registration
details, in order tocreate a fresh new Registration
Bulk Actions to status change, trash, delete
- Bulk Action can be performed on the existing
Registration
list on selecting theBulk Actions
type i.e trash all, re-store all, delete all etc. and changing theUsers
status(email verified,email verification pending,user create) - Bulk action can also be performed on only limited or on selected
Registration
by and selectingActions
i.e trash, re-store, delete etc and changing theRegistration
status(email verified,email verification pending,user create)
For more understanding, please watch the below video.
- Create New
Registration
- Clone the
Registration
details. - Edit/Update the details of already exists
Registration
. - Deleting exists
Registration
. - Deleting temporary/Trashing already exists
Registration
. - List All existing
Registration
. - Filtering the
Registration
list by searching using differentfields
. - Filtering the
Registration
list by different status, trashedRegistration
. - Sorting the
Registration
with ascending/descending order. - Autofill the
Registration
field. - Bulk Actions to status change,trash,delete
Permission
Permissions allow users to access certain features of a course or project site, depending on their roles, and on the decisions made by the site owner and the system administrator. The ability to do actions on your site (including viewing content, editing content, and changing configuration) is governed by permissions. Each permission has a name (such as View published content) and covers one action or a small subset of actions.
Field Name | Section | Description |
---|---|---|
Can Create Registrations | Registration | This will allow user to add new user |
Can Read Registrations | Registration | This will allow user to view the registered users details |
Can Update Registrations | Registration | This will allow user to edit and update the users details |
Can Manage Registrations | Registration | This will allow user to edit and update the users details |
Has Access Of Registrations Section | Registration | This will allow user see the link of registration section. |
Can Create Users From Registrations | Registration | This will allow user to add users in the registration section. |
Can Delete Registrations | Registration | This will allow user to delete anything in the registration section. |
Can See Registrations Contact Details | Registration | This will allow user to view contact detail in the registration section. |
Files
List of all the files responsible for this pages
- Laravel Route:
packages/vaahcms/Routes/backend/routes-registrations.php
- Laravel Controller:
packages/vaahcms/Http/Controllers/Backend/RegistrationsController.php
- Laravel Model:
packages/vaahcms/Models/Registration.php
- Vue Route:
packages/vaahcms/Vue/vaahtwo/routes/vue-routes-registrations.js
- Vue Store:
packages/vaahcms/Vue/vaahtwo/stores/store-registrations.js
- Vue Page Director:
packages/vaahcms/Vue/vaahtwo/pages/registrations
Methods
some methods which can be reused.
- itemAction() method can be used for actions like
restore
,trash
in particular item
packages/vaahcms/Models/Registration.php
Registration::itemAction($request,$id,$type);
where $request
is HTTP request,$id
is Item's id,$type
is action type.
- listAction() methods can be used for different actions like
trash
,restore
,delete
,trash all
,delete all
,restore all
and different status change on item's list
packages/vaahcms/Models/Registration.php
Registration::listAction($request,$id,$type);
where $request
is HTTP request,$id
is Item's id,$type
is action type.
API
Create User
Method: post
URL: <public-url>/api/vaah/registrations/form
Request Parameters
Parameter | Description | Type | Dafault |
---|---|---|---|
api_token | API Token id for authentication | String | |
avatar_url | User's Avtar Image URL | Image | |
bio | User's bio | String | |
birth | User's Date of birth | Date | |
country | User's Country | String | |
country_calling_code | User country's Calling code | Number | |
country_code | User's Country code | String | |
created_by | Admin Id | Number | |
deleted_by | Admin Id | Number | |
designation | User's designation | String | |
display_name | User's Display name to be seen | String | |
required User's | String | ||
first_name | required User's | String | |
gender | m for male , f for female , o for Other User's | String | |
last_name | User's | String | |
middle_name | User's | String | |
password | required User's | String | |
phone | User's | Number | |
status | user-created , email-verified , email-verification-pending User's | String | |
timezone | User's preferred area bases timezone | String | |
title | User's Title i.e Mr/Mrs/Miss/Ms | String | |
updated_by | Admin's Id who has updated the details | Number | |
username | User's | String | |
uuid | User's Unique Identifier ID | String |
Response Parameters
Parameter | Description | Type |
---|---|---|
success | Set true if list accessible | Boolean |
data | data that get stored successfully | Object |
message | message on successfully date saved | Text |
Sample Request
{
"alternate_email": "vfunk@yahoo.com"
"avatar_url": "png.pngtree/ourmid/image_1541962.jpg"
"bio": "Cum iusto at corporis."
"birth": "2023-01-01T18:30:00.000Z"
"country": "India"
"country_calling_code": "91"
"country_code": "IN"
"designation": "Autem"
"display_name": "solon.hickle"
"email": "liliane17@tillman.biz"
"first_name": "Hailey"
"gender": "m"
"last_name": "Pollich"
"middle_name": "Dach"
"phone": "8222282222"
"status": "email-verification-pending"
"timezone": "Pacific/Midway"
"title": "Mr"
"username": "grace24"
}
Sample Response
{
"status": true,
"data": {
"item": {
.............
.............
}
},
"messages": [
"Saved successfully."
]
}
Get a List
Method: get
URL: <public-url>/api/vaah/registrations
Request Parameters
Parameter | Description | Type | Default |
---|---|---|---|
q | Value to be search in first_name , middle_name , last_name , display_name , email and id Column | String | |
per_page | N Item Per Page | Number | 20 |
status | Status of Registration and may be either email-verification-vending , email-verified or user-created | String | |
trashed | Set true to show Trashed (Soft Delete) data | Boolean | false |
sort | Ascending or Descending sort list | String |
Response Parameters
Parameter | Description | Type |
---|---|---|
success | Set true if list accessible | Boolean |
data | all the matched data with query or the data available | Object |
first_page_url | url for first page | Url |
from | User count starts with | Number |
last_page | Max number of page in pagination | Number |
last_page_url | Url for last page | Url |
links | previous and next page links ,active ,label | Object |
next_page_url | Url for next page | Url |
path | Url for page | Url |
per_page | Users count to show at a time | Number |
prev_page_url | Url for previous page | Url |
to | Max number of users accessed | Number |
total | Count users | Number |
Sample Request
parameter = [
'api_token' => 'xxxxxxxxxxx', // for authentication
'q' => 'search_item',
'status' => 'email-verification-vending / email-verified / user-created',
'per_page' => 20,
'trashed' => false, // true, false
'updated_at' => // asc, desc
];
Sample Response
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"uuid": "07052497-c12f-4e21-a119-edf20d51f3ad",
"email": "ekoelpin@yahoo.com",
"username": "ekoelpin",
............
............
............
},
{
"id": 2,
"uuid": "a119-edf20d51f3ad-07052497-c12f-4e21",
"email": "lenaoe@gmail.com",
"username": "lenaoe",
............
............
............
}
],
"first_page_url": "<public-url>/backend\/vaah\/registrations?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "<public-url>/backend\/vaah\/registrations?page=1",
"links": [
{
"url": "<public-url>\/backend\/vaah\/registrations?page=1",
"label": "« Previous",
"active": false
},
{
"url": "<public-url>\/backend\/vaah\/registrations?page=2",
"label": "1",
"active": true
},
{
"url": "<public-url>\/backend\/vaah\/registrations?page=3",
"label": "Next »",
"active": false
}
],
"path": "<public-url>\/backend\/vaah\/registrations",
"per_page": 20,
"prev_page_url": "<public-url>\/backend\/vaah\/registrations?page=1",
"to": 2
"total": 2
}
}
Get Item
Method: get
URL: <public-url>/api/registrations/{form/view}/{id}
Request Parameters
Parameter | Description | Type |
---|---|---|
id | User's id | Number |
api_token | for authentication | String |
trashed | true, false | Boolean |
Response Parameters
Parameter | Description | Type |
---|---|---|
success | Set true if list accessible | Boolean |
data | All the matched data with request used Id | Object |
Sample Request
parameter = [
'api_token' => 'xxxxxxxxxxx', // for authentication
'trashed' => false, // true, false
];
Sample Response
{
"status": true,
"data": {
"id": 1,
"uuid": "07052497-c12f-4e21-a119-edf20d51f3ad",
"email": "lturcotte@yahoo.com",
"username": "ekoelpin",
.............
.............
.............
},
}
Update
Method: PUT
URL: <public-url>/api/registrations/{id}
Request Parameters
Parameter | Description | Type |
---|---|---|
api_token | for authentication | String |
required | String | |
username | slug generated or user's field name | String |
id | required | Number |
password | required | String |
display_name | optional | Number |
title | User Name title like (Mr,Mrs,Miss,Ms) | String |
designation | Users designation | String |
first_name | required | String |
middle_name | optional | String |
last_name | optional | String |
gender | m for male , f for female , o for Other | String |
country_calling_code | optional | Number |
bio | optional | String |
timezone | Country and states wise timezone | String |
alternate_email | optional | String |
birth | User's Date of birth | Date |
country_code | Country Name Intails Like IN for India,USA for United States of America etc | Number |
status | required - (user-created , email-verified , email-verification-pending) | String |
Response Parameters
Parameter | Description | Type |
---|---|---|
Success | response type | Boolean |
data | all requested parameters with some value inside data object | Object |
messages | response type message | String |
Sample Request
parameter = [
"activated_at": "2022-12-28 18:33:53"
"activated_ip": "xxxxxxxxxxxxx"
"activation_code": "xxxxxxxxxxxxxxxxxxxx"
"activation_code_sent_at": null
"alternate_email": "grobel@dicki.com"
"avatar_url": "png.pngtree/ourmid/image_1541962.jpg"
"bio": "Omnis suscipit qui tenetur nisi."
"birth": "2022-12-28"
"country": "India"
"country_calling_code": "91"
"country_code": "IN"
"created_at": "2022-12-28 18:33:53"
"created_by": 1
"created_by_user":
{
"id": 1,
"uuid": "034d5c4b-0a0d-4ec6-a20c-5d69b70889e1",
"first_name": "Webreinvent",
"last_name": "Team",
โฆโฆโฆโฆโฆโฆโฆ
โฆโฆโฆโฆโฆโฆโฆ
โฆโฆโฆโฆโฆโฆโฆ
}
"email": "we@webreinvent.com"
"first_name": "Webreinvent"
"last_name": "Team"
"name": "Webreinvent Team"
"uuid": "034d5c4b-0a0d-4ec6-a20c-5d69b70889e1"
"designation": "Ad quia quo ipsa."
"display_name": "kovacek.ursula"
"email": "jammie12@hotmail.com"
"first_name": "Edward"
"gender": "m"
"id": 88
"last_name": "Witting"
"middle_name": "Hyatt"
"phone": "8585858585"
"status": "user-created"
"timezone": "Atlantic/Madeira"
"title": "Dolor et natus ut."
"updated_at": "2023-01-02 19:08:59"
"updated_by": 1
"updated_by_user":
{
"id": 1,
"uuid": "034d5c4b-0a0d-4ec6-a20c-5d69b70889e1",
"first_name": "Webreinvent",
"last_name": "Team",
โฆโฆโฆโฆโฆโฆโฆ
โฆโฆโฆโฆโฆโฆโฆ
โฆโฆโฆโฆโฆโฆโฆ
}
"email": "we@webreinvent.com"
"first_name": "Webreinvent"
"id": 1
"last_name": "Team"
"name": "Webreinvent Team"
"uuid": "034d5c4b-0a0d-4ec6-a20c-5d69b70889e1"
"user_created_at": "2023-01-02 19:08:59"
"username": "destiney72"
"uuid": "416b81fc-f273-4dd0-8f18-e301f5c677dd"
"vh_user_id": 99 // json format
];
Sample Response
{
"success": true,
"data": {
"item": {
"id": 88,
"uuid": "416b81fc-f273-4dd0-8f18-e301f5c677dd",
"email": "jammie12@hotmail.com",
"username": "destiney72",
"display_name": "kovacek.ursula",
"title": "Dolor et natus ut.",
"designation": "Ad quia quo ipsa.",
"first_name": "Edward",
"middle_name": "Hyatt",
"last_name": "Witting",
"gender": "m",
"country_calling_code": "",
"phone": "9876522222",
"bio": "Omnis suscipit qui tenetur nisi.",
"timezone": "Atlantic\/Madeira",
"alternate_email": "grobel@dicki.com",
"avatar_url": "png.pngtree/ourmid/image_1541962.jpg"
"birth": "2022-12-28",
"country": "91",
"country_code": "IN",
"status": "user-created",
"activation_code": "qrtya43cghtaqrr77saskweerrr",
"activation_code_sent_at": "testinf_durect@gmail.com",
"activated_at": "2023-01-02 19:08:59"
"invited_at": "2023-01-02 19:08:59",
"belong_id": 857,
"vh_user_id": 24,
"user_created_at": "2023-01-02 19:08:59",
"meta": {
},
"created_by": 1,
"updated_by": 1,
"created_at": "2022-12-28 18:33:53",
"updated_at": "2023-01-02 19:09:10",
"deleted_at": null,
"created_by_user": {
"id": 1,
"uuid": "034d5c4b-0a0d-4ec6-a20c-5d69b70889e1",
"first_name": "Webreinvent",
"last_name": "Team",
"email": "we@webreinvent.com",
"name": "Webreinvent Team"
},
"updated_by_user": {
"id": 1,
"uuid": "034d5c4b-0a0d-4ec6-a20c-5d69b70889e1",
"first_name": "Webreinvent",
"last_name": "Team",
"email": "we@webreinvent.com",
"name": "Webreinvent Team"
},
"deleted_by_user": null
}
},
"messages": [
"Saved successfully."
]
}
Delete
Method: delete
URL: <public-url>/api/registrations/{id}
Response Parameters
Parameter | Description | Type |
---|---|---|
success | response type | Boolean |
data | null | NA |
messages | response message | String |
Sample Response
{
"success": true,
"data": [
],
"messages": [
"Record has been deleted"
]
}