2017 © Pedro Peláez
 

library users

image

optimuscms/users

  • Monday, July 9, 2018
  • by optimuscms
  • Repository
  • 1 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 179 % Grown

The README.md

Optimus Users

This package provides the core backend functionality for managing the users who can access the CMS., (*1)

Installation

This package can be installed through Composer., (*2)

composer require optimuscms/users

In Laravel 5.5 and above the package will autoregister the service provider., (*3)

In Laravel 5.4 you must install this service provider:, (*4)

// config/app.php
'providers' => [
    ...
    Optimus\Users\UserServiceProvider::class,
    ...
];

API Routes

The API follows standard RESTful conventions, with responses being returned in JSON. Appropriate HTTP status codes are provided, and these should be used to check the outcome of an operation., (*5)

Users, (*6)

List users

List all registered users., (*7)

GET /admin/api/users

Request Body, (*8)

None, (*9)

Example Response, (*10)

{
    "data": [
        {
            "id": 1,
            "name": "Jack Robertson",
            "email": "jack@optixsolutions.co.uk",
            "username": "jack",
            "created_at": "2019-02-19 09:14:44",
            "updated_at": "2019-02-19 09:14:50"
        },
        {
            "id": 2,
            "name": "Rich Moore",
            "email": "rich@optixsolutions.co.uk",
            "username": "rich",
            "created_at": "2019-02-19 09:36:23",
            "updated_at": "2019-02-19 09:36:23"
        }
    ]
}

Create user

Create a new users who can access the CMS., (*11)

POST /admin/api/users

Request Body, (*12)

Parameter Required Type Description
name Yes string The name of the user
email Yes string The email address of the user
username Yes string A username which will be used to login to the CMS
password Yes string A password which will be used to login to the CMS

Example Response, (*13)

Returns the details of the newly created user. See single user response example., (*14)

Get user

Get the details of a specific user., (*15)

GET /admin/api/users/{id}

Request Body, (*16)

None, (*17)

Example Response, (*18)

{
    "data": {
        "id": 1,
        "name": "Jack Robertson",
        "email": "jack@optixsolutions.co.uk",
        "username": "jack",
        "created_at": "2019-02-19 09:14:44",
        "updated_at": "2019-02-19 09:14:50"
    }
}

Update user

Update the details of a specific user., (*19)

PATCH /admin/api/users/{id}

Request Body, (*20)

Parameter Required Type Description
name Yes string The name of the user
email Yes string The email address of the user
username Yes string A username which will be used to login to the CMS
password No string A password which will be used to login to the CMS

Example Response, (*21)

Returns the details of the updated user. See single user response example., (*22)

Delete user

Delete a user so they can no longer access the CMS., (*23)

DELETE /admin/api/users/{id}

Request Body, (*24)

None, (*25)

Example Response, (*26)

The HTTP status code will be 204 if successful., (*27)

License

The MIT License (MIT). Please see License File for more information., (*28)

The Versions

09/07 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Jack Robertson