yii-framework

MIT License

Stars
0
Committers
2

user api with yii2 basic

Web apps with Yii 2 Rest API..

Built with * Yii2

Prerequisite Technologies

Installation

Clone the repository from Github.

git clone https://github.com/shweta130890/yii-framework.git
cd yii-framework
composer update 

APIs with sample payloads

GET(api/users/index)

[
   {
       "id": 1,
       "username": "shweta",
       "email": "[email protected]",
       "password": "123456",
       "isActive": false,
       "role": 1
   },
   {
       "id": 2,
       "username": "shweta1",
       "email": "[email protected]",
       "password": "123456",
       "isActive": true,
       "role": 1
   },
   {
       "id": 3,
       "username": "shweta2",
       "email": "[email protected]",
       "password": "123456",
       "isActive": true,
       "role": 10
   }
]

POST(api/users/login)

   { 
       "username": "shweta/[email protected]", 
       "password": "123456" 
   } 

POST(api/users/signup)

   { 
       "username": "shweta2",
       "email": "[email protected]",
       "password": "123456"
   } 
   

PUT(api/users/update?id=1)

   { 
       "id": 2,
       "username": "test",
       "email": "[email protected]",
       "fullname": "",
       "password": "$2y$13$QHpmTWzZI3SGI45km.IFR.iAeYyeFF/WTWGijxF6JzGZxDN1CgDoa",
       "role": 1,
       "status": 1,
       "created_at": "2019-07-09 18:53:01",
       "updated_at": "2019-07-11 06:43:50",
       "last_login": "2019-07-09 20:36:11"
   }