clientela-demo

This project is for Clientela.

Requirments:
Used language: PHP >= 7.2.5
Used Framework: Laravel 6.*
Used Datebase: mysql 5.6 or MariaDB 10.1.26

Installation:
download and install composer (download composer)
run command in project root directory: composer install.

Import Database:
run command in project root directory: php artisan migrate
or
import clientela.sql file from project root folder.

Database config:
copy or rename .env.example file to .env
find and set values:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

Api methods:
GET: /api/customers // returns all customers
GET: /api/customers/{id} //returns customer by id
DELETE: /api/customers/{id} // deletes customer from database
POST: /api/customers // add customer
PUT: /api/customers/{id} // update customer

All requests must be set header: Accept: application/json

All requests must to set api_token as url params or in Authorization: Bearer api_token.

For demo usage api_token is: "clientela".

For POST and PUT methods in headers must be set:
Accept: application/json
Content-Type: application/x-www-form-urlencoded

Documentation on theneo.io