Note - please do not hesitate to contact me in case if there would be any questions.
- Download the project
- Open the root file of php project
- Open the terminal in this file and type
$ php -S localhost:8000 -t public/
- Install dependencies, run
$ composer install
- Upload
.sql
file into your database;
http://localhost:8000/pizza
[GET] returns all pizza that belongs to concrete users
http://localhost:8000/pizza/{id}
[GET] returns concrete pizza
http://localhost:8000/pizza/create
[POST] creates pizza [Parameters: 'name' => 'required', 'pizza_type_id'=> 'required|numeric', 'quantity' => 'required|numeric|min:1']
http://localhost:8000/pizza/update/{id}
[POST] updates pizza [Parameters: 'name' => 'max:200', 'pizza_type_id'=> 'numeric', 'quantity' => 'numeric|min:1']
http://localhost:8000/pizza/delete/{id}
[DELETE] delete pizza
http://localhost:8000/type
[GET] returns all pizza type
http://localhost:8000/type/{id}
[GET] returns concrete pizza
http://localhost:8000/type/create
[POST] creates pizza type [Parameters 'name' => 'required|min:1' ]
- In order to auth your user, copy token placed in folder "token.txt"
- Past the token into HEADER, name it "Authorization" during the request.
Authorization = [JWT KEY]