- Download or clone this repository
- Put the folder in htdocs
- Open terminal in project's folder
- Run
composer install
- Run
copy .env.example .env
orcp .env.example .env
(git bash) - Open .env file and change the database name (DB_DATABASE)
- Run
php artisan key:generate
- Run
php artisan migrate
- Run
php artisan serve
- Install Postgres from here
- Search for
;extension=pdo_pgsql
and;extension=pgsql
inside php.ini file located in xampp's folder and remove the;
- In .env file change DB_CONNECTION, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD matching postgres' defaults
- In xampp start only the Apache Module
- Create your migration files as usual and run migration
Used to get the menu.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
{
[
{
"id",
"name",
"description",
"items" =>
[
{
"id",
"name",
"price",
"description",
}
]
}
]
}
Used to get all sent orders for kitchen.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
[
{
"cart": [
{
"id",
"order_id",
"item_id",
"quantity",
"notes",
"item_name",
"price",
"description",
"extras" => [
{
"id",
"name",
"price",
"pivot" => {
"order_item_id",
"extra_id",
}
}
]
}
],
"order_complete": "sent",
"updated_at": "date",
"umbralla_id": "0","1"
}
]
Get a specific item's info.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
{
"id",
"name",
"price",
"category_id",
"description",
"extras" =>
[
{
"id",
"name",
"price",
"pivot" =>
{
"item_id",
"extra_id,
}
}
]
}
Get the cart for the customer or take-away.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
[
{
"id",
"order_id",
"item_id",
"quantity",
"item_name",
"price",
"description",
"notes",
"extras" => [
{
"id",
"name",
"price",
"pivot" =>
{
"order_item_id",
"extra_id",
}
},
]
}
]
Create new order for kitchen.
Headers:
{
'Authorization' : 'Bearer ' token
}
Body:
{
"user_id": UserType id
}
Response:
{
"order_id"
}
Create new orderItem and add it to my cart.
Headers:
{
'Authorization' : 'Bearer ' token
}
Body:
{
"order_id",
"item_id",
"quantity",
"notes",
"extras_id": [
{
"extra_id",
}
]
}
Response:
{
"id",
"order_id",
"item_id",
"quantity",
"notes",
"extras" =>
[
{
"id",
"name",
"price",
"pivot" =>
{
"item_id",
"extra_id
}
}
]
}
Not used.
Body:
{
"id (του userType)"
}
Response:
{
"token"
}
Used to connect with backend (get jwt).
Body:
{
"umbrella_id"
}
Response:(for customer)
{
"token",
"orderId,
"role_name",
}
Response:(for kitchen)
{
"token",
"role_name",
"userTypeId"
}
Used to logout.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
{
"message"
}
Not used.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
{
"refreshedToken"
}
To mark an order as sent and delete user.
Headers:
{
'Authorization' : 'Bearer ' token
}
Params:
{
"order_complete": 'sent','unsent','completed','processed'
}
Response:
[
{
"cart": [
{
"id",
"order_id",
"item_id",
"quantity",
"notes",
"item_name",
"price",
"description",
"extras" => [
{
"id",
"name",
"price",
"pivot" => {
"order_item_id",
"extra_id",
}
}
]
}
],
"order_complete": "sent",
"updated_at": "date",
"umbralla_id": "0","1"
}
]
To mark an order as sent, unsent, completed or processed for kitchen.
Headers:
{
'Authorization' : 'Bearer ' token
}
Params:
{
"order_complete": 'sent','unsent','completed','processed'
}
Response:
[
{
"cart": [
{
"id",
"order_id",
"item_id",
"quantity",
"notes",
"item_name",
"price",
"description",
"extras" => [
{
"id",
"name",
"price",
"pivot" => {
"order_item_id",
"extra_id",
}
}
]
}
],
"order_complete": "sent",
"updated_at": "date",
"umbralla_id": "0","1"
}
]
To change quantity of an order item.
Headers:
{
'Authorization' : 'Bearer ' token
}
Params:
{
"quantity": 2
}
Response:
[
{
"id",
"order_id",
"item_id",
"quantity",
"item_name",
"price",
"description",
"notes",
"extras" => [
{
"id",
"name",
"price",
"pivot" =>
{
"order_item_id",
"extra_id",
}
},
]
}
]
To delete an orderItem.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
[
{
"id",
"order_id",
"item_id",
"quantity",
"item_name",
"price",
"description",
"notes",
"extras" => [
{
"id",
"name",
"price",
"pivot" =>
{
"order_item_id",
"extra_id",
}
},
]
}
]
To delete an order.
Headers:
{
'Authorization' : 'Bearer ' token
}
Response:
[]
The Laravel framework is open-sourced software licensed under the MIT license.