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 different fields.
  • Filtering the Registration list by different status, trashed Registration.
  • 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

  1. From Registrations
  2. 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:

NOTE
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 the pencil button and change the input field value.

Deleting exists Users

-To deleting the Registration there are 2 way to delete Registration -

  1. from the view/form(edit) page.
    To delete the Registration just click on the view button and click on the down arrow button. there is a Delete button option.
  2. from the User list and select the delete action.
    To delete the Registration first select the user and click on the down arrow button then click on the Delete option.

Deleting temporary/Trashing already exists Registration

  • To deleting temporary the Registration there are 2 way to temporary delete the Registration -
  1. from the view/form(edit) page.
    To trash the Registration just click on the view button and click on the down arrow button. there is a Trash button option.
  2. from the Registration list and selecting the trash action.
    To trash the Registration first select the user and click on the down arrow button then click on the Trash 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 by Registration different status(email verification pending, user created, email verified) and by including/excluding the trashed Registration.
    To filter the details. Click on the filter 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 and updating Registration details, in order to create a new Registration with similar data.
    When you choose the Create & 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 of create a new Registration or updating Registration details, in order to create a fresh new Registration

Bulk Actions to status change, trash, delete

  • Bulk Action can be performed on the existing Registration list on selecting the Bulk Actions type i.e trash all, re-store all, delete all etc. and changing the Users status(email verified,email verification pending,user create)
  • Bulk action can also be performed on only limited or on selected Registration by and selecting Actions i.e trash, re-store, delete etc and changing the Registration 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 different fields.
  • Filtering the Registration list by different status, trashed Registration.
  • 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 NameSectionDescription
Can Create RegistrationsRegistrationThis will allow user to add new user
Can Read RegistrationsRegistrationThis will allow user to view the registered users details
Can Update RegistrationsRegistrationThis will allow user to edit and update the users details
Can Manage RegistrationsRegistrationThis will allow user to edit and update the users details
Has Access Of Registrations SectionRegistrationThis will allow user see the link of registration section.
Can Create Users From RegistrationsRegistrationThis will allow user to add users in the registration section.
Can Delete RegistrationsRegistrationThis will allow user to delete anything in the registration section.
Can See Registrations Contact DetailsRegistrationThis 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
ParameterDescriptionTypeDafault
api_tokenAPI Token id for authenticationString
avatar_urlUser's Avtar Image URLImage
bioUser's bioString
birthUser's Date of birthDate
countryUser's CountryString
country_calling_codeUser country's Calling codeNumber
country_codeUser's Country codeString
created_byAdmin IdNumber
deleted_byAdmin IdNumber
designationUser's designationString
display_nameUser's Display name to be seenString
emailrequired User'sString
first_namerequired User'sString
genderm for male , f for female , o for Other User'sString
last_nameUser'sString
middle_nameUser'sString
passwordrequired User'sString
phoneUser'sNumber
statususer-created , email-verified , email-verification-pending User'sString
timezoneUser's preferred area bases timezoneString
titleUser's Title i.e Mr/Mrs/Miss/MsString
updated_byAdmin's Id who has updated the detailsNumber
usernameUser'sString
uuidUser's Unique Identifier IDString
Response Parameters
ParameterDescriptionType
successSet true if list accessibleBoolean
datadata that get stored successfullyObject
messagemessage on successfully date savedText
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
ParameterDescriptionTypeDefault
qValue to be search in first_name, middle_name, last_name, display_name, email and id ColumnString
per_pageN Item Per PageNumber20
statusStatus of Registration and may be either email-verification-vending, email-verified or user-createdString
trashedSet true to show Trashed (Soft Delete) dataBooleanfalse
sortAscending or Descending sort listString
Response Parameters
ParameterDescriptionType
successSet true if list accessibleBoolean
dataall the matched data with query or the data availableObject
first_page_urlurl for first pageUrl
fromUser count starts withNumber
last_pageMax number of page in paginationNumber
last_page_urlUrl for last pageUrl
linksprevious and next page links,active,labelObject
next_page_urlUrl for next pageUrl
pathUrl for pageUrl
per_pageUsers count to show at a timeNumber
prev_page_urlUrl for previous pageUrl
toMax number of users accessedNumber
totalCount usersNumber
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": "&laquo; 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 &raquo;",
        "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
ParameterDescriptionType
idUser's idNumber
api_tokenfor authenticationString
trashedtrue, falseBoolean
Response Parameters
ParameterDescriptionType
successSet true if list accessibleBoolean
dataAll the matched data with request used IdObject
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
ParameterDescriptionType
api_tokenfor authenticationString
emailrequiredString
usernameslug generated or user's field nameString
idrequiredNumber
passwordrequiredString
display_nameoptionalNumber
titleUser Name title like (Mr,Mrs,Miss,Ms)String
designationUsers designationString
first_namerequiredString
middle_nameoptionalString
last_nameoptionalString
genderm for male , f for female , o for OtherString
country_calling_codeoptionalNumber
biooptionalString
timezoneCountry and states wise timezoneString
alternate_emailoptionalString
birthUser's Date of birthDate
country_codeCountry Name Intails Like IN for India,USA for United States of America etcNumber
statusrequired - (user-created , email-verified , email-verification-pending)String
Response Parameters
ParameterDescriptionType
Successresponse typeBoolean
dataall requested parameters with some value inside data objectObject
messagesresponse type messageString
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
ParameterDescriptionType
successresponse typeBoolean
datanullNA
messagesresponse messageString
Sample Response
{
  "success": true,
  "data": [
    
  ],
  "messages": [
    "Record has been deleted"
  ]
}