NAV
bash javascript php

Introduction

Welcome to the code documentation of COCOTEL. Get Postman Collection

Backend | Add Property

This is a list of all the properties that you can create, edit, and delete properties.

index()

The property is the hotel and this is the database or a list of properties where few information/data are on partial display. Until you’ve clicked a property to manage, only a few information will appear. This is the code:

Example request:

curl -X GET -G "http://localhost/admin/add-property-management" 
const url = new URL("http://localhost/admin/add-property-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/add-property-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/add-property-management

store()

When you click a create a property on the database, you will be lead to editing information and finally saving it. Clicking the save button and finally adding it to the existing database. This is the code that will run in order to save the property/hotel:

Example request:

curl -X POST "http://localhost/admin/add-property-management?email=example%40email.com&emailVerified=rerum&password=accusamus&displayName=repellendus&phoneNumber=18&user_type=host&no_of_property=12" \
    -H "Content-Type: application/json" \
    -d '{"id":5,"password":"ExploreCocotel","password_confirmation":"ExploreCocotel"}'
const url = new URL("http://localhost/admin/add-property-management");

    let params = {
            "email": "example@email.com",
            "emailVerified": "rerum",
            "password": "accusamus",
            "displayName": "repellendus",
            "phoneNumber": "18",
            "user_type": "host",
            "no_of_property": "12",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": 5,
    "password": "ExploreCocotel",
    "password_confirmation": "ExploreCocotel"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/add-property-management", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "email" => "example@email.com",
            "emailVerified" => "rerum",
            "password" => "accusamus",
            "displayName" => "repellendus",
            "phoneNumber" => "18",
            "user_type" => "host",
            "no_of_property" => "12",
        ],
    'json' => [
            "id" => "5",
            "password" => "ExploreCocotel",
            "password_confirmation" => "ExploreCocotel",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/add-property-management

Body Parameters

Parameter Type Status Description
id integer required The id of the host.
password string required The password of the host.
password_confirmation string required The password confirmation of the host.

Query Parameters

Parameter Status Description
email required The email of the host.
emailVerified required Email verification sent to the host.
password required The password of the host.
displayName required The full name of the host.
phoneNumber required The contact number of the host.
user_type required The user type of the host.
no_of_property required The number of property.

Backend | Amenities Management

In this section, you can manage and change the amenities of the hotel and rooms for the desktop version. You can create, update, and delete the amenities icons so you can have full control if per say a specific room doesn’t offer a similar amenity with the other room.

deleteAmenity(Request $request)

When you want to delete the amenity, this is the code that you will need to run.

Example request:

curl -X POST "http://localhost/admin/amenities-management-web/delete-amenity?uid=sint&path=aperiam" \
    -H "Content-Type: application/json" \
    -d '{"uid":"deleniti","path":"nulla"}'
const url = new URL("http://localhost/admin/amenities-management-web/delete-amenity");

    let params = {
            "uid": "sint",
            "path": "aperiam",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "deleniti",
    "path": "nulla"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/amenities-management-web/delete-amenity", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "sint",
            "path" => "aperiam",
        ],
    'json' => [
            "uid" => "deleniti",
            "path" => "nulla",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/amenities-management-web/delete-amenity

Body Parameters

Parameter Type Status Description
uid string required The unique id of the amenitites.
path string required The image/icon path of the amenitites.

Query Parameters

Parameter Status Description
uid required The unique id of the amenitites.
path required The image/icon path of the amenitites.

updateAmenity(Request $request)

When you edit amenity and when you want to save the amenity that you’ve updated, this will be the code that you need to run. This will be the one that will save the updates of your amenities:

Example request:

curl -X POST "http://localhost/admin/amenities-management-web/update-amenity?uid=molestiae&title=voluptate&storage_path=nulla&url_path=quo" \
    -H "Content-Type: application/json" \
    -d '{"uid":"libero","title":"hic","icon-image":"voluptas"}'
const url = new URL("http://localhost/admin/amenities-management-web/update-amenity");

    let params = {
            "uid": "molestiae",
            "title": "voluptate",
            "storage_path": "nulla",
            "url_path": "quo",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "libero",
    "title": "hic",
    "icon-image": "voluptas"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/amenities-management-web/update-amenity", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "molestiae",
            "title" => "voluptate",
            "storage_path" => "nulla",
            "url_path" => "quo",
        ],
    'json' => [
            "uid" => "libero",
            "title" => "hic",
            "icon-image" => "voluptas",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/amenities-management-web/update-amenity

Body Parameters

Parameter Type Status Description
uid string required The unique id of the amenitites.
title string required The title of the amenitites.
icon-image string optional The image/icon of the amenitites.

Query Parameters

Parameter Status Description
uid required The unique id of the amenitites.
title required The title of the amenitites.
storage_path optional The created path for the image/icon of the amenitites.
url_path optional The link of the image/icon with firebase link.

index()

To display the list of amenities that exists in the database, this is the code that you need to run to display it:

Example request:

curl -X GET -G "http://localhost/admin/amenities-management-web" 
const url = new URL("http://localhost/admin/amenities-management-web");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/amenities-management-web", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/amenities-management-web

store(Request $request)

When you create and add a new amenity and click the save button, this will be the code that you need to run so you can save it when you press the save button:

Example request:

curl -X POST "http://localhost/admin/amenities-management-web?title=quas&storage_path=suscipit&url_path=omnis" \
    -H "Content-Type: application/json" \
    -d '{"title":"veniam"}'
const url = new URL("http://localhost/admin/amenities-management-web");

    let params = {
            "title": "quas",
            "storage_path": "suscipit",
            "url_path": "omnis",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "title": "veniam"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/amenities-management-web", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "title" => "quas",
            "storage_path" => "suscipit",
            "url_path" => "omnis",
        ],
    'json' => [
            "title" => "veniam",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/amenities-management-web

Body Parameters

Parameter Type Status Description
title string required The title of the amenitites.

Query Parameters

Parameter Status Description
title required The title of the amenitites.
storage_path required The created path for the image/icon of the amenitites.
url_path required The link of the image/icon with firebase link.

Backend | Blog Management

In this section, you can manage and change the blogs of users. Like Add Property, you can create, update, and delete blogs in this database.

deletePost(Request $request)

This is the code that will run if you need to delete a blog post:

Example request:

curl -X POST "http://localhost/admin/blog-management/delete-post?uid=labore&path=asperiores" \
    -H "Content-Type: application/json" \
    -d '{"uid":"vitae","path":"est"}'
const url = new URL("http://localhost/admin/blog-management/delete-post");

    let params = {
            "uid": "labore",
            "path": "asperiores",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "vitae",
    "path": "est"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/blog-management/delete-post", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "labore",
            "path" => "asperiores",
        ],
    'json' => [
            "uid" => "vitae",
            "path" => "est",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/blog-management/delete-post

Body Parameters

Parameter Type Status Description
uid string required The unique id of the blogs.
path string required The image/icon path of the blogs.

Query Parameters

Parameter Status Description
uid required The unique id of the blogs.
path required The image/icon path of the blogs.

index()

This is the code for a list of the blogs that will appear on the database. You can create, update, and delete blogs:

Example request:

curl -X GET -G "http://localhost/admin/blog-management" 
const url = new URL("http://localhost/admin/blog-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/blog-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/blog-management

create()

This is the code that will run for the form to appear when creating a new blog post: the fill-up form (name, title, description etc.) to show when creating a new blog:

Example request:

curl -X GET -G "http://localhost/admin/blog-management/create" 
const url = new URL("http://localhost/admin/blog-management/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/blog-management/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/blog-management/create

store(Request $request)

When you create a blog and when you fill up the information such as name,title, description etc. this is the code that you will need to save it: this is the code that you will need to save the blog:

Example request:

curl -X POST "http://localhost/admin/blog-management?name=consequatur&facebook=illo&twitter=natus&instagram=omnis&title=ex&description=ipsum&inner_content=culpa&created_at=harum&storage_path=culpa&url_path=tempore" \
    -H "Content-Type: application/json" \
    -d '{"name":"quia","facebook":"incidunt","twitter":"nihil","instagram":"ullam","title":"velit","description":"dolores","background":"labore","inner_content":"atque"}'
const url = new URL("http://localhost/admin/blog-management");

    let params = {
            "name": "consequatur",
            "facebook": "illo",
            "twitter": "natus",
            "instagram": "omnis",
            "title": "ex",
            "description": "ipsum",
            "inner_content": "culpa",
            "created_at": "harum",
            "storage_path": "culpa",
            "url_path": "tempore",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "name": "quia",
    "facebook": "incidunt",
    "twitter": "nihil",
    "instagram": "ullam",
    "title": "velit",
    "description": "dolores",
    "background": "labore",
    "inner_content": "atque"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/blog-management", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "name" => "consequatur",
            "facebook" => "illo",
            "twitter" => "natus",
            "instagram" => "omnis",
            "title" => "ex",
            "description" => "ipsum",
            "inner_content" => "culpa",
            "created_at" => "harum",
            "storage_path" => "culpa",
            "url_path" => "tempore",
        ],
    'json' => [
            "name" => "quia",
            "facebook" => "incidunt",
            "twitter" => "nihil",
            "instagram" => "ullam",
            "title" => "velit",
            "description" => "dolores",
            "background" => "labore",
            "inner_content" => "atque",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/blog-management

Body Parameters

Parameter Type Status Description
name string required The name of the blog.
facebook The optional facebook link of the author.
twitter The optional twitter link of the author.
instagram The optional instagram link of the author.
title string required The title of the blog.
description string required The brief description of the blog.
background string required The image for thumbnail of the blog.
inner_content string required The whole content of the blog.

Query Parameters

Parameter Status Description
name required The name of the blog.
facebook optional The facebook link of the author.
twitter optional The twitter link of the author.
instagram optional The instagram link of the author.
title required The title of the blog.
description required The description of the blog.
inner_content required The whole content of the blog.
created_at required The created time and date of the blog.
storage_path required The created path for the background image of the blog.
url_path required The image link of the background with firebase link.

edit($id)

When you want to edit the blog: This is the code that you will need to run to show the form to edit the blog:

Example request:

curl -X GET -G "http://localhost/admin/blog-management/1/edit?uid=placeat" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ut"}'
const url = new URL("http://localhost/admin/blog-management/1/edit");

    let params = {
            "uid": "placeat",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ut"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/blog-management/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "placeat",
        ],
    'json' => [
            "uid" => "ut",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/blog-management/{blog_management}/edit

Body Parameters

Parameter Type Status Description
uid string required The unique id of the blogs.

Query Parameters

Parameter Status Description
uid required The unique id of the blogs.

update(Request $request, $id)

When you edit the blog you’ve created, this will be the code that will run: this will be code that will save the updates of your blogs.

Example request:

curl -X PUT "http://localhost/admin/blog-management/1?name=incidunt&facebook=eaque&twitter=accusamus&instagram=nam&title=suscipit&description=neque&inner_content=omnis&created_at=earum&storage_path=debitis&url_path=tempora" \
    -H "Content-Type: application/json" \
    -d '{"name":"cum","facebook":"quia","twitter":"quibusdam","instagram":"rerum","title":"et","description":"asperiores","background":"excepturi","inner_content":"quisquam"}'
const url = new URL("http://localhost/admin/blog-management/1");

    let params = {
            "name": "incidunt",
            "facebook": "eaque",
            "twitter": "accusamus",
            "instagram": "nam",
            "title": "suscipit",
            "description": "neque",
            "inner_content": "omnis",
            "created_at": "earum",
            "storage_path": "debitis",
            "url_path": "tempora",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "name": "cum",
    "facebook": "quia",
    "twitter": "quibusdam",
    "instagram": "rerum",
    "title": "et",
    "description": "asperiores",
    "background": "excepturi",
    "inner_content": "quisquam"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/blog-management/1", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "name" => "incidunt",
            "facebook" => "eaque",
            "twitter" => "accusamus",
            "instagram" => "nam",
            "title" => "suscipit",
            "description" => "neque",
            "inner_content" => "omnis",
            "created_at" => "earum",
            "storage_path" => "debitis",
            "url_path" => "tempora",
        ],
    'json' => [
            "name" => "cum",
            "facebook" => "quia",
            "twitter" => "quibusdam",
            "instagram" => "rerum",
            "title" => "et",
            "description" => "asperiores",
            "background" => "excepturi",
            "inner_content" => "quisquam",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/blog-management/{blog_management}

PATCH admin/blog-management/{blog_management}

Body Parameters

Parameter Type Status Description
name string required The name of the blog.
facebook The optional facebook link of the author.
twitter The optional twitter link of the author.
instagram The optional instagram link of the author.
title string required The title of the blog.
description string required The brief description of the blog.
background string required The image for thumbnail of the blog.
inner_content string required The whole content of the blog.

Query Parameters

Parameter Status Description
name required The name of the blog.
facebook optional The facebook link of the author.
twitter optional The twitter link of the author.
instagram optional The instagram link of the author.
title required The title of the blog.
description required The description of the blog.
inner_content required The whole content of the blog.
created_at required The created time and date of the blog.
storage_path required The created path for the background image of the blog.
url_path required The image link of the background with firebase link.

Backend | Booking Management

This is the section where you can manage and change the booking of users. You can create, update, and delete in this section.

cancelBooking(Request $request)

This is the code that will run if you press the cancel button on your bookings. It will cancel the booking that you choose.

Example request:

curl -X POST "http://localhost/admin/booking-management/cancel-booking" \
    -H "Content-Type: application/json" \
    -d '{"id":17}'
const url = new URL("http://localhost/admin/booking-management/cancel-booking");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": 17
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/booking-management/cancel-booking", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "17",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/booking-management/cancel-booking

Body Parameters

Parameter Type Status Description
id integer required The id of the booking.

walkIn()

This is the list of all the booking customers from the existing database who went straight for a walk-in to the hotel without any reservations. A list will appear with a partial display and this will be the code needed to run the list:

Example request:

curl -X GET -G "http://localhost/admin/booking-management/walk-in" 
const url = new URL("http://localhost/admin/booking-management/walk-in");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/booking-management/walk-in", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/booking-management/walk-in

online()

This is a list of all users who booked online that’s already in the database.

Example request:

curl -X GET -G "http://localhost/admin/booking-management/online" 
const url = new URL("http://localhost/admin/booking-management/online");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/booking-management/online", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/booking-management/online

index()

This is a list of bookings of users that’s already in the database. This is the code that you will need to run so it will display the list of bookings of users that’s already in the database with a partial information display:

Example request:

curl -X GET -G "http://localhost/admin/booking-management" 
const url = new URL("http://localhost/admin/booking-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/booking-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/booking-management

Backend | Content Management

This is a tool for the maximum customizability of your website. Here you can manage and change the look and content of the existing website. With Content Management, it is an easy-to-access backend tool so you can also create or update text and images for every part of your website.

getRemoveRepeaterFields(Request $request)

This is the section for the Repeater field. If there’s a repeater field in the page, this will be the code that you need to run so you can remove an item from a repeater field:

Example request:

curl -X GET -G "http://localhost/admin/content-management/remove-repeater-fields?id=necessitatibus" \
    -H "Content-Type: application/json" \
    -d '{"id":10}'
const url = new URL("http://localhost/admin/content-management/remove-repeater-fields");

    let params = {
            "id": "necessitatibus",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": 10
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/content-management/remove-repeater-fields", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "id" => "necessitatibus",
        ],
    'json' => [
            "id" => "10",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/content-management/remove-repeater-fields

Body Parameters

Parameter Type Status Description
id integer required The id of the existing repeaterfield.

Query Parameters

Parameter Status Description
id required The id of the existing repeaterfield.

getRepeaterFields(Request $request)

If there’s a repeater field in the page, this will be the code that you need to run so you can display existing data/content on the repeater field:

Example request:

curl -X GET -G "http://localhost/admin/content-management/repeater-fields?id=nihil" \
    -H "Content-Type: application/json" \
    -d '{"id":4}'
const url = new URL("http://localhost/admin/content-management/repeater-fields");

    let params = {
            "id": "nihil",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": 4
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/content-management/repeater-fields", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "id" => "nihil",
        ],
    'json' => [
            "id" => "4",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/content-management/repeater-fields

Body Parameters

Parameter Type Status Description
id integer required The id of the existing repeaterfield.

Query Parameters

Parameter Status Description
id required The id of the existing repeaterfield.

index()

This is a list of all the pages in the website. This includes the homepage, About Us, Join Page, Offers Page etc. All of the pages in this list features an Edit action button because you can fully customize the text and contents per page. This is the code that you will need to run to display the list of all pages:

Example request:

curl -X GET -G "http://localhost/admin/content-management" 
const url = new URL("http://localhost/admin/content-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/content-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/content-management

create()

This is the code that you will need to run to display the form for creating a new page or adding a new section for an existing page:

Example request:

curl -X GET -G "http://localhost/admin/content-management/create" 
const url = new URL("http://localhost/admin/content-management/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/content-management/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/content-management/create

store(Request $request)

Store a newly created page or newly added section in a existing page.

Example request:

curl -X POST "http://localhost/admin/content-management" 
const url = new URL("http://localhost/admin/content-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/content-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/content-management

edit($id)

Show the form for editing the specified page.

Example request:

curl -X GET -G "http://localhost/admin/content-management/1/edit?id=10" \
    -H "Content-Type: application/json" \
    -d '{"id":5}'
const url = new URL("http://localhost/admin/content-management/1/edit");

    let params = {
            "id": "10",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": 5
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/content-management/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "id" => "10",
        ],
    'json' => [
            "id" => "5",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/content-management/{content_management}/edit

Body Parameters

Parameter Type Status Description
id integer required The id of the existing page.

Query Parameters

Parameter Status Description
id required The id of the existing page.

update(Request $request, $id)

When you edit a page and when you want to save the page that you’ve updated, this will be the code that you need to run. This will be the one that will save the updates of your page:

Example request:

curl -X PUT "http://localhost/admin/content-management/1?id=12" \
    -H "Content-Type: application/json" \
    -d '{"id":4}'
const url = new URL("http://localhost/admin/content-management/1");

    let params = {
            "id": "12",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": 4
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/content-management/1", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "id" => "12",
        ],
    'json' => [
            "id" => "4",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/content-management/{content_management}

PATCH admin/content-management/{content_management}

Body Parameters

Parameter Type Status Description
id integer required The id of the existing page.

Query Parameters

Parameter Status Description
id required The id of the existing page.

Backend | Facilities Services Management

sample description dito, here you can manage and change the facilities and services you can create/update/delete here change the look of the icon for each facilities and services

deleteItem(Request $request)

pag dinelete mo ung facilities or services ito naman yung code na mag rurun

Example request:

curl -X POST "http://localhost/admin/facilities-services-management/delete-item?uid=quam&path=architecto" \
    -H "Content-Type: application/json" \
    -d '{"uid":"sequi","path":"quo"}'
const url = new URL("http://localhost/admin/facilities-services-management/delete-item");

    let params = {
            "uid": "quam",
            "path": "architecto",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "sequi",
    "path": "quo"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/facilities-services-management/delete-item", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "quam",
            "path" => "architecto",
        ],
    'json' => [
            "uid" => "sequi",
            "path" => "quo",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/facilities-services-management/delete-item

Body Parameters

Parameter Type Status Description
uid string required The unique id of the facilities and services.
path string required The image/icon path of the facilities and services.

Query Parameters

Parameter Status Description
uid required The unique id of the facilities and services.
path required The image/icon path of the facilities and services.

index()

ito yung listahan ng mga facilities and services na nasa database na tapos nag didisplay ito ng title at icon for partial display

Example request:

curl -X GET -G "http://localhost/admin/facilities-services-management" 
const url = new URL("http://localhost/admin/facilities-services-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/facilities-services-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/facilities-services-management

create()

Show the form for creating a new facilities or services.

Example request:

curl -X GET -G "http://localhost/admin/facilities-services-management/create" 
const url = new URL("http://localhost/admin/facilities-services-management/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/facilities-services-management/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/facilities-services-management/create

store(Request $request)

Store a newly created facilities or services in database.

Example request:

curl -X POST "http://localhost/admin/facilities-services-management?title=odit&storage_path=et&url_path=quae" \
    -H "Content-Type: application/json" \
    -d '{"title":"cum","icon":"occaecati"}'
const url = new URL("http://localhost/admin/facilities-services-management");

    let params = {
            "title": "odit",
            "storage_path": "et",
            "url_path": "quae",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "title": "cum",
    "icon": "occaecati"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/facilities-services-management", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "title" => "odit",
            "storage_path" => "et",
            "url_path" => "quae",
        ],
    'json' => [
            "title" => "cum",
            "icon" => "occaecati",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/facilities-services-management

Body Parameters

Parameter Type Status Description
title string required The title of the facilities and services.
icon string required The image/icon path of the facilities and services.

Query Parameters

Parameter Status Description
title required The title of the facilities and services.
storage_path required The created path for the image/icon of the facilities and services.
url_path required The link of the image/icon with firebase link.

edit($id)

Show the form for editing the specified facilities or services.

Example request:

curl -X GET -G "http://localhost/admin/facilities-services-management/1/edit?uid=enim" \
    -H "Content-Type: application/json" \
    -d '{"uid":"dolorem"}'
const url = new URL("http://localhost/admin/facilities-services-management/1/edit");

    let params = {
            "uid": "enim",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "dolorem"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/facilities-services-management/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "enim",
        ],
    'json' => [
            "uid" => "dolorem",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/facilities-services-management/{facilities_services_management}/edit

Body Parameters

Parameter Type Status Description
uid string required The uid of the existing facilities and services.

Query Parameters

Parameter Status Description
uid required The uid of the existing facilities and services.

update(Request $request, $id)

pag nag edit ka ng page then sinave mo ito ung code na mag rurun ito ung nag sasave ng updates mo sa facilities or services

Example request:

curl -X PUT "http://localhost/admin/facilities-services-management/1?uid=ullam&title=facere&storage_path=optio&url_path=voluptate" \
    -H "Content-Type: application/json" \
    -d '{"uid":"nemo","title":"culpa","icon":"a"}'
const url = new URL("http://localhost/admin/facilities-services-management/1");

    let params = {
            "uid": "ullam",
            "title": "facere",
            "storage_path": "optio",
            "url_path": "voluptate",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "nemo",
    "title": "culpa",
    "icon": "a"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/facilities-services-management/1", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "uid" => "ullam",
            "title" => "facere",
            "storage_path" => "optio",
            "url_path" => "voluptate",
        ],
    'json' => [
            "uid" => "nemo",
            "title" => "culpa",
            "icon" => "a",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/facilities-services-management/{facilities_services_management}

PATCH admin/facilities-services-management/{facilities_services_management}

Body Parameters

Parameter Type Status Description
uid string required The uid of the existing facilities and services.
title string required The title of the facilities and services.
icon string required The image/icon path of the facilities and services.

Query Parameters

Parameter Status Description
uid required The uid of the existing facilities and services.
title required The title of the facilities and services.
storage_path required The created path for the image/icon of the facilities and services.
url_path required The link of the image/icon with firebase link.

Backend | Hotel & Room Management

APIs for managing hotels and rooms

updateServiceCharge

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/updateServiceCharge" 
const url = new URL("http://localhost/admin/host-hotel-management/updateServiceCharge");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/updateServiceCharge", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/updateServiceCharge

postDeleteHost(Request $request)

This endpoint will delete a specific host.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/delete-host" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/delete-host");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/delete-host", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "uid" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/delete-host

Body Parameters

Parameter Type Status Description
uid string optional The id of the host.

postDeleteProperty(Request $request)

This endpoint will delete a specific property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/delete-property" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/delete-property");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/delete-property", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "uid" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/delete-property

Body Parameters

Parameter Type Status Description
uid string optional The id of the property.

postUnliveProperty(Request $request)

This endpoint will unlive the status of specific given property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/unlive-property?status=unlive" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/unlive-property");

    let params = {
            "status": "unlive",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/unlive-property", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "status" => "unlive",
        ],
    'json' => [
            "uid" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/unlive-property

Body Parameters

Parameter Type Status Description
uid string optional The id of the property.

Query Parameters

Parameter Status Description
status required The status of the property.

postLiveProperty(Request $request)

This endpoint will live the status of specific given property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/live-property?status=live" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/live-property");

    let params = {
            "status": "live",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/live-property", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "status" => "live",
        ],
    'json' => [
            "uid" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/live-property

Body Parameters

Parameter Type Status Description
uid string optional The id of the property.

Query Parameters

Parameter Status Description
status required The status of the property.

postAddImages(Request $request)

This endpoint will add/save images to the selected property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/add-images?public_id=Example_1.png&url=https%3A%2F%2Fres.cloudinary.com%2FExample%2Fv123%2FExample_1.png" \
    -H "Content-Type: application/json" \
    -d '{"hotel_id":"ABC123abc","images":"[Example_1.png,Example_2.jpg]"}'
const url = new URL("http://localhost/admin/host-hotel-management/add-images");

    let params = {
            "public_id": "Example_1.png",
            "url": "https://res.cloudinary.com/Example/v123/Example_1.png",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "hotel_id": "ABC123abc",
    "images": "[Example_1.png,Example_2.jpg]"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/add-images", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "public_id" => "Example_1.png",
            "url" => "https://res.cloudinary.com/Example/v123/Example_1.png",
        ],
    'json' => [
            "hotel_id" => "ABC123abc",
            "images" => "[Example_1.png,Example_2.jpg]",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/add-images

Body Parameters

Parameter Type Status Description
hotel_id string required The id of the property.
images json required The images to add in the selected property.

Query Parameters

Parameter Status Description
public_id required The image public id from cloudinary.
url required The image link from cloudinary.

postRoomAddImages(Request $request)

This endpoint will add/save images to the selected room.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/add-room-images?public_id=Example_1.png&url=https%3A%2F%2Fres.cloudinary.com%2FExample%2Fv123%2FExample_1.png" \
    -H "Content-Type: application/json" \
    -d '{"hotel_id":"ABC123abc","room_id":"ABC123abc","images":"[Example_1.png,Example_2.jpg]"}'
const url = new URL("http://localhost/admin/host-hotel-management/add-room-images");

    let params = {
            "public_id": "Example_1.png",
            "url": "https://res.cloudinary.com/Example/v123/Example_1.png",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "hotel_id": "ABC123abc",
    "room_id": "ABC123abc",
    "images": "[Example_1.png,Example_2.jpg]"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/add-room-images", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "public_id" => "Example_1.png",
            "url" => "https://res.cloudinary.com/Example/v123/Example_1.png",
        ],
    'json' => [
            "hotel_id" => "ABC123abc",
            "room_id" => "ABC123abc",
            "images" => "[Example_1.png,Example_2.jpg]",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/add-room-images

Body Parameters

Parameter Type Status Description
hotel_id string required The id of the property.
room_id string required The id of the room.
images json required The images to add in the selected room.

Query Parameters

Parameter Status Description
public_id required The image public id from cloudinary.
url required The image link from cloudinary.

postDeleteHost(Request $request)

This endpoint will delete a specific host.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/delete-image" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/delete-image");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/delete-image", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "uid" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/delete-image

Body Parameters

Parameter Type Status Description
uid string optional The id of the host.

postSetPrimary(Request $request)

This endpoint will set a primary image/photo of the property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/set-primary?primary=true" \
    -H "Content-Type: application/json" \
    -d '{"hotel_id":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/set-primary");

    let params = {
            "primary": "true",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "hotel_id": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/set-primary", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "primary" => "true",
        ],
    'json' => [
            "hotel_id" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/set-primary

Body Parameters

Parameter Type Status Description
hotel_id string required The id of the property.

Query Parameters

Parameter Status Description
primary required Define if the selected image is primary.

postRoomDeleteImage(Request $request)

This endpoint will remove/delete image of the selected room in property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/delete-room-image" \
    -H "Content-Type: application/json" \
    -d '{"hotel_id":"ABC123abc","room_id":"ABC123abc","id":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/delete-room-image");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "hotel_id": "ABC123abc",
    "room_id": "ABC123abc",
    "id": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/delete-room-image", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "hotel_id" => "ABC123abc",
            "room_id" => "ABC123abc",
            "id" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/delete-room-image

Body Parameters

Parameter Type Status Description
hotel_id string required The id of the property.
room_id string required The id of the property room.
id string required The public id of cloudinary image.

postRoomSetPrimary(Request $request)

This endpoint will set a primary image/photo of the room in property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/set-room-primary?primary=true" \
    -H "Content-Type: application/json" \
    -d '{"hotel_id":"ABC123abc","room_id":"ABC123abc","key":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/set-room-primary");

    let params = {
            "primary": "true",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "hotel_id": "ABC123abc",
    "room_id": "ABC123abc",
    "key": "ABC123abc"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/set-room-primary", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "primary" => "true",
        ],
    'json' => [
            "hotel_id" => "ABC123abc",
            "room_id" => "ABC123abc",
            "key" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/set-room-primary

Body Parameters

Parameter Type Status Description
hotel_id string required The id of the property.
room_id string required The id of the property room.
key string required The public id of cloudinary image.

Query Parameters

Parameter Status Description
primary required Define if the selected image is primary.

postEditHost(Request $request)

This endpoint will save/update the data from edit page of the host.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/edit?email=example%40email.com&displayName=John+Doe&phoneNumber=%2B639123456789&mobile_code=63&mobile_number=9123456789" \
    -H "Content-Type: application/json" \
    -d '{"uid":"ABC123abc","name":"John Doe","email":"example@email.com","mobile_code":63,"mobile_number":"9123456789"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/edit");

    let params = {
            "email": "example@email.com",
            "displayName": "John Doe",
            "phoneNumber": "+639123456789",
            "mobile_code": "63",
            "mobile_number": "9123456789",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "uid": "ABC123abc",
    "name": "John Doe",
    "email": "example@email.com",
    "mobile_code": 63,
    "mobile_number": "9123456789"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "email" => "example@email.com",
            "displayName" => "John Doe",
            "phoneNumber" => "+639123456789",
            "mobile_code" => "63",
            "mobile_number" => "9123456789",
        ],
    'json' => [
            "uid" => "ABC123abc",
            "name" => "John Doe",
            "email" => "example@email.com",
            "mobile_code" => "63",
            "mobile_number" => "9123456789",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/edit

Body Parameters

Parameter Type Status Description
uid string optional The id of the host.
name string required The name of the host.
email string required The email of the host.
mobile_code integer required The mobile country code of the host.
mobile_number string required The mobile number of the host.

Query Parameters

Parameter Status Description
email required The email of the host.
displayName required The name of the host.
phoneNumber required The full mobile number of the host.
mobile_code required The mobile country code of the host.
mobile_number required The mobile number of the host.

getEditHost($id)

This endpoint will show/display the edit page of the host.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/edit" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/edit");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/edit

Body Parameters

Parameter Type Status Description
id string optional The id of the host.

postProperty(Request $request)

This endpoint will save/update the data from edit page of the host.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property?contact_number=%2B639123456789&title=COCOTELRooms&description=Lorem+ipsum+dolor&address=Boracay+Island&address_line1=Boracay+Island&address_line2=Boracay+Island&city=Example+Manila&zip=5608&country=Philippines&province=Aklan&host_id=1&service_charge=0&status=live&cloudinary_images=%5BExample_1.png%2CExample_2.jpg%5D" \
    -H "Content-Type: application/json" \
    -d '{"title":"COCOTELRooms","description":"Lorem ipsum dolor","address_line1":"Boracay Island","city":"Example Manila","zip":"5608","country":"Philippines","province":"Aklan","images":"[Example_1.png,Example_2.jpg]"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property");

    let params = {
            "contact_number": "+639123456789",
            "title": "COCOTELRooms",
            "description": "Lorem ipsum dolor",
            "address": "Boracay Island",
            "address_line1": "Boracay Island",
            "address_line2": "Boracay Island",
            "city": "Example Manila",
            "zip": "5608",
            "country": "Philippines",
            "province": "Aklan",
            "host_id": "1",
            "service_charge": "0",
            "status": "live",
            "cloudinary_images": "[Example_1.png,Example_2.jpg]",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "title": "COCOTELRooms",
    "description": "Lorem ipsum dolor",
    "address_line1": "Boracay Island",
    "city": "Example Manila",
    "zip": "5608",
    "country": "Philippines",
    "province": "Aklan",
    "images": "[Example_1.png,Example_2.jpg]"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "contact_number" => "+639123456789",
            "title" => "COCOTELRooms",
            "description" => "Lorem ipsum dolor",
            "address" => "Boracay Island",
            "address_line1" => "Boracay Island",
            "address_line2" => "Boracay Island",
            "city" => "Example Manila",
            "zip" => "5608",
            "country" => "Philippines",
            "province" => "Aklan",
            "host_id" => "1",
            "service_charge" => "0",
            "status" => "live",
            "cloudinary_images" => "[Example_1.png,Example_2.jpg]",
        ],
    'json' => [
            "title" => "COCOTELRooms",
            "description" => "Lorem ipsum dolor",
            "address_line1" => "Boracay Island",
            "city" => "Example Manila",
            "zip" => "5608",
            "country" => "Philippines",
            "province" => "Aklan",
            "images" => "[Example_1.png,Example_2.jpg]",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property

Body Parameters

Parameter Type Status Description
title string required The property title of the host.
description string required The description of the property.
address_line1 string required The address of the property.
city string required The city of the property.
zip string required The zipcode of the property.
country string required The country of the property.
province string required The province of the property.
images json required The images of the property.

Query Parameters

Parameter Status Description
contact_number required The full contact number of the host.
title required The property title of the host.
description required The description of the property.
address required The all address of the property.
address_line1 required The first address of the property.
address_line2 optional The second address of the property.
city required The city of the property.
zip required The zipcode of the property.
country required The country of the property.
province required The province of the property.
host_id required The uid of the host.
service_charge required The service charge of the property.
status required The status of the property.
cloudinary_images required The images of the property.

getProperty($id)

This endpoint will show/display the property page.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property

Body Parameters

Parameter Type Status Description
id string optional The id of the property.

getCreateProperty($id)

This endpoint will show/display the create page of the property.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/create" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property/create");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/create", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/create

Body Parameters

Parameter Type Status Description
id string optional The id of the host.

getEditProperty($id)

This endpoint will show/display the edit page of the property.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/edit" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc","key":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/edit");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc",
    "key": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
            "key" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/edit

Body Parameters

Parameter Type Status Description
id string optional The id of the host.
key string optional The id of the property.

postEditProperty(Request $request, $id, $key)

This endpoint will save/update all data from getEditProperty($id, $key) endpoint.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property/1/edit?id=ABC123abc&key=ABC123abc&title=COCOTELRooms&description=Lorem+ipsum+dolor&address=Boracay+Island&address_line1=Boracay+Island&address_line2=Boracay+Island&city=Example+Manila&zip=5608&country=Philippines&province=Aklan" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc","key":"ABC123abc","title":"COCOTELRooms","description":"Lorem ipsum dolor","address_line1":"Boracay Island","city":"Example Manila","zip":"5608","country":"Philippines","province":"Aklan"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/edit");

    let params = {
            "id": "ABC123abc",
            "key": "ABC123abc",
            "title": "COCOTELRooms",
            "description": "Lorem ipsum dolor",
            "address": "Boracay Island",
            "address_line1": "Boracay Island",
            "address_line2": "Boracay Island",
            "city": "Example Manila",
            "zip": "5608",
            "country": "Philippines",
            "province": "Aklan",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc",
    "key": "ABC123abc",
    "title": "COCOTELRooms",
    "description": "Lorem ipsum dolor",
    "address_line1": "Boracay Island",
    "city": "Example Manila",
    "zip": "5608",
    "country": "Philippines",
    "province": "Aklan"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property/1/edit", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "id" => "ABC123abc",
            "key" => "ABC123abc",
            "title" => "COCOTELRooms",
            "description" => "Lorem ipsum dolor",
            "address" => "Boracay Island",
            "address_line1" => "Boracay Island",
            "address_line2" => "Boracay Island",
            "city" => "Example Manila",
            "zip" => "5608",
            "country" => "Philippines",
            "province" => "Aklan",
        ],
    'json' => [
            "id" => "ABC123abc",
            "key" => "ABC123abc",
            "title" => "COCOTELRooms",
            "description" => "Lorem ipsum dolor",
            "address_line1" => "Boracay Island",
            "city" => "Example Manila",
            "zip" => "5608",
            "country" => "Philippines",
            "province" => "Aklan",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property/{key}/edit

Body Parameters

Parameter Type Status Description
id string optional The id of the host.
key string optional The id of the property.
title string required The property title of the host.
description string required The description of the property.
address_line1 string required The address of the property.
city string required The city of the property.
zip string required The zipcode of the property.
country string required The country of the property.
province string required The province of the property.

Query Parameters

Parameter Status Description
id optional string The id of the host.
key optional string The id of the property.
title required The property title of the host.
description required The description of the property.
address required The all address of the property.
address_line1 required The first address of the property.
address_line2 optional The second address of the property.
city required The city of the property.
zip required The zipcode of the property.
country required The country of the property.
province required The province of the property.

getManageImages($id)

This endpoint will show/display the edit images page of the property.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/manage-images" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc","key":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/manage-images");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc",
    "key": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/manage-images", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
            "key" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/manage-images

Body Parameters

Parameter Type Status Description
id string optional The id of the host.
key string optional The id of the property.

postRooms(Request $request)

This endpoint will add/save room to the selected property.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property/1/rooms?cocotel=true&room_type=King+Size&description=Lorem+ipsum+dolor&amenities=%5BWiFi%2CAircon%5D&promos=regular&public_id=Example_1.png&url=https%3A%2F%2Fres.cloudinary.com%2FExample%2Fv123%2FExample_1.png" \
    -H "Content-Type: application/json" \
    -d '{"key":"ABC123abc","room_type":"King Size","description":"Lorem ipsum dolor","images":"[Example_1.png,Example_2.jpg]","amenities":"[WiFi,Aircon]"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms");

    let params = {
            "cocotel": "true",
            "room_type": "King Size",
            "description": "Lorem ipsum dolor",
            "amenities": "[WiFi,Aircon]",
            "promos": "regular",
            "public_id": "Example_1.png",
            "url": "https://res.cloudinary.com/Example/v123/Example_1.png",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "key": "ABC123abc",
    "room_type": "King Size",
    "description": "Lorem ipsum dolor",
    "images": "[Example_1.png,Example_2.jpg]",
    "amenities": "[WiFi,Aircon]"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property/1/rooms", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "cocotel" => "true",
            "room_type" => "King Size",
            "description" => "Lorem ipsum dolor",
            "amenities" => "[WiFi,Aircon]",
            "promos" => "regular",
            "public_id" => "Example_1.png",
            "url" => "https://res.cloudinary.com/Example/v123/Example_1.png",
        ],
    'json' => [
            "key" => "ABC123abc",
            "room_type" => "King Size",
            "description" => "Lorem ipsum dolor",
            "images" => "[Example_1.png,Example_2.jpg]",
            "amenities" => "[WiFi,Aircon]",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property/{key}/rooms

Body Parameters

Parameter Type Status Description
key string required The id of the property.
room_type string required The type of the selected room.
description string required The description of the selected room.
images json required The images to add in the selected room.
amenities json required The amenities to add in the selected room.

Query Parameters

Parameter Status Description
cocotel required Define if room is a cocotel rooms.
room_type required The type of the selected room.
description required The description of the selected room.
amenities required The amenities to add in the selected room.
promos required All of the promos and their rates.
public_id required The image public id from cloudinary.
url required The image link from cloudinary.

getRooms($id)

This endpoint will show/display the rooms page of the property.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/rooms" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc","key":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc",
    "key": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/rooms", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
            "key" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/rooms

Body Parameters

Parameter Type Status Description
id string optional The id of the host.
key string optional The id of the property.

getManageImageRooms

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/rooms/1/manage-images" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/manage-images");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/manage-images", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/rooms/{roomid}/manage-images

getEditRooms

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/rooms/1/edit" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/edit");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/edit", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/rooms/{roomid}/edit

postEditRooms

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property/1/rooms/1/edit" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/edit");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/edit", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property/{key}/rooms/{roomid}/edit

postRoomRates

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property/1/rooms/1/rates" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/rates");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/rates", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property/{key}/rooms/{roomid}/rates

getRoomRates

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/rooms/1/rates" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/rates");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/rooms/1/rates", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/rooms/{roomid}/rates

getCreateRoom

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/rooms/create" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/rooms/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/rooms/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/rooms/create

postdeleteRoom

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/rooms/deleteRoom" 
const url = new URL("http://localhost/admin/host-hotel-management/rooms/deleteRoom");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/rooms/deleteRoom", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/rooms/deleteRoom

postRewardsNight

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/rooms/rewardsNight" 
const url = new URL("http://localhost/admin/host-hotel-management/rooms/rewardsNight");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/rooms/rewardsNight", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/rooms/rewardsNight

postUpdateRates

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/rooms/updateRates" 
const url = new URL("http://localhost/admin/host-hotel-management/rooms/updateRates");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/rooms/updateRates", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/rooms/updateRates

postFacilitiesServices

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property/1/facilities-services" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/facilities-services");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property/1/facilities-services", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property/{key}/facilities-services

getFacilitiesServices

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/facilities-services" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/facilities-services");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/facilities-services", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/facilities-services

getCreateFacilitiesServices

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/facilities-services/create" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/facilities-services/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/facilities-services/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/facilities-services/create

postdeleteFacility

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/facilities-services/deleteFacility" 
const url = new URL("http://localhost/admin/host-hotel-management/facilities-services/deleteFacility");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/facilities-services/deleteFacility", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/facilities-services/deleteFacility

postTermsCondition

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/1/property/1/terms-condition" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/terms-condition");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/1/property/1/terms-condition", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/{id}/property/{key}/terms-condition

getTermsCondition

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/terms-condition" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/terms-condition");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/terms-condition", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/terms-condition

getTermsConditionCreate

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/1/property/1/terms-condition/create" 
const url = new URL("http://localhost/admin/host-hotel-management/1/property/1/terms-condition/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/1/property/1/terms-condition/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/{id}/property/{key}/terms-condition/create

postdeleteTerm

Example request:

curl -X POST "http://localhost/admin/host-hotel-management/terms-condition/deleteTerm" 
const url = new URL("http://localhost/admin/host-hotel-management/terms-condition/deleteTerm");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management/terms-condition/deleteTerm", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management/terms-condition/deleteTerm

index()

This endpoint will show/display all the existing host.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management" 
const url = new URL("http://localhost/admin/host-hotel-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management

create(Request $request)

This endpoint will show/display the create page of the host.

Example request:

curl -X GET -G "http://localhost/admin/host-hotel-management/create" \
    -H "Content-Type: application/json" \
    -d '{"id":"ABC123abc"}'
const url = new URL("http://localhost/admin/host-hotel-management/create");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "id": "ABC123abc"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/host-hotel-management/create", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "id" => "ABC123abc",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/host-hotel-management/create

Body Parameters

Parameter Type Status Description
id string optional The id of the host.

store(Request $request)

This endpoint will save/update the data from edit page of the host.

Example request:

curl -X POST "http://localhost/admin/host-hotel-management?email=example%40email.com&emailVerified=false&password=Password123&displayName=John+Doe&phoneNumber=%2B639123456789&disabled=false&user_type=host&mobile_code=63&mobile_number=9123456789&hotels=%5B1%2C2%2C3%5D&contact_number=%2B639123456789&title=COCOTELRooms&description=Lorem+ipsum+dolor&address=Boracay+Island&address_line1=Boracay+Island&address_line2=Boracay+Island&city=Example+Manila&zip=5608&country=Philippines&province=Aklan&host_id=1&service_charge=0&status=live&cloudinary_images=%5BExample_1.png%2CExample_2.jpg%5D" \
    -H "Content-Type: application/json" \
    -d '{"name":"John Doe","email":"example@email.com","mobile_code":63,"mobile_number":"9123456789","password":"Password123","password_confirmation":"Password123","title":"COCOTELRooms","description":"Lorem ipsum dolor","address_line1":"Boracay Island","city":"Example Manila","zip":"5608","country":"Philippines","province":"Aklan","images":"[Example_1.png,Example_2.jpg]"}'
const url = new URL("http://localhost/admin/host-hotel-management");

    let params = {
            "email": "example@email.com",
            "emailVerified": "false",
            "password": "Password123",
            "displayName": "John Doe",
            "phoneNumber": "+639123456789",
            "disabled": "false",
            "user_type": "host",
            "mobile_code": "63",
            "mobile_number": "9123456789",
            "hotels": "[1,2,3]",
            "contact_number": "+639123456789",
            "title": "COCOTELRooms",
            "description": "Lorem ipsum dolor",
            "address": "Boracay Island",
            "address_line1": "Boracay Island",
            "address_line2": "Boracay Island",
            "city": "Example Manila",
            "zip": "5608",
            "country": "Philippines",
            "province": "Aklan",
            "host_id": "1",
            "service_charge": "0",
            "status": "live",
            "cloudinary_images": "[Example_1.png,Example_2.jpg]",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "name": "John Doe",
    "email": "example@email.com",
    "mobile_code": 63,
    "mobile_number": "9123456789",
    "password": "Password123",
    "password_confirmation": "Password123",
    "title": "COCOTELRooms",
    "description": "Lorem ipsum dolor",
    "address_line1": "Boracay Island",
    "city": "Example Manila",
    "zip": "5608",
    "country": "Philippines",
    "province": "Aklan",
    "images": "[Example_1.png,Example_2.jpg]"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/host-hotel-management", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'query' => [
            "email" => "example@email.com",
            "emailVerified" => "false",
            "password" => "Password123",
            "displayName" => "John Doe",
            "phoneNumber" => "+639123456789",
            "disabled" => "false",
            "user_type" => "host",
            "mobile_code" => "63",
            "mobile_number" => "9123456789",
            "hotels" => "[1,2,3]",
            "contact_number" => "+639123456789",
            "title" => "COCOTELRooms",
            "description" => "Lorem ipsum dolor",
            "address" => "Boracay Island",
            "address_line1" => "Boracay Island",
            "address_line2" => "Boracay Island",
            "city" => "Example Manila",
            "zip" => "5608",
            "country" => "Philippines",
            "province" => "Aklan",
            "host_id" => "1",
            "service_charge" => "0",
            "status" => "live",
            "cloudinary_images" => "[Example_1.png,Example_2.jpg]",
        ],
    'json' => [
            "name" => "John Doe",
            "email" => "example@email.com",
            "mobile_code" => "63",
            "mobile_number" => "9123456789",
            "password" => "Password123",
            "password_confirmation" => "Password123",
            "title" => "COCOTELRooms",
            "description" => "Lorem ipsum dolor",
            "address_line1" => "Boracay Island",
            "city" => "Example Manila",
            "zip" => "5608",
            "country" => "Philippines",
            "province" => "Aklan",
            "images" => "[Example_1.png,Example_2.jpg]",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/host-hotel-management

Body Parameters

Parameter Type Status Description
name string required The name of the host.
email string required The email of the host.
mobile_code integer required The mobile country code of the host.
mobile_number string required The mobile number of the host.
password string required The password of the host.
password_confirmation string required The password confirmation of the host.
title string required The property title of the host.
description string required The description of the property.
address_line1 string required The address of the property.
city string required The city of the property.
zip string required The zipcode of the property.
country string required The country of the property.
province string required The province of the property.
images json required The images of the property.

Query Parameters

Parameter Status Description
email required The email of the host.
emailVerified required Defined if email is already verified.
password required The password of the host.
displayName required The name of the host.
phoneNumber required The full mobile number of the host.
disabled required Defined if user is disabled.
user_type required Defined if user is host/cocotel.
mobile_code required The mobile country code of the host.
mobile_number required The mobile number of the host.
hotels required The id of each hotel of specific host.
contact_number required The full contact number of the host.
title required The property title of the host.
description required The description of the property.
address required The all address of the property.
address_line1 required The first address of the property.
address_line2 optional The second address of the property.
city required The city of the property.
zip required The zipcode of the property.
country required The country of the property.
province required The province of the property.
host_id required The uid of the host.
service_charge required The service charge of the property.
status required The status of the property.
cloudinary_images required The images of the property.

Backend | Main Controller

getIndex

Example request:

curl -X GET -G "http://localhost/admin" 
const url = new URL("http://localhost/admin");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin

Backend | Member Management

APIs for managing members

ban

Example request:

curl -X POST "http://localhost/admin/member-management/ban" 
const url = new URL("http://localhost/admin/member-management/ban");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/member-management/ban", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/member-management/ban

unban

Example request:

curl -X POST "http://localhost/admin/member-management/unban" 
const url = new URL("http://localhost/admin/member-management/unban");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/member-management/unban", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/member-management/unban

getDetails

Example request:

curl -X GET -G "http://localhost/admin/member-management/1/details" 
const url = new URL("http://localhost/admin/member-management/1/details");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/member-management/1/details", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/member-management/{id}/details

getProfile

Example request:

curl -X GET -G "http://localhost/admin/member-management/1/profile" 
const url = new URL("http://localhost/admin/member-management/1/profile");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/member-management/1/profile", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/member-management/{id}/profile

index

Example request:

curl -X GET -G "http://localhost/admin/member-management" 
const url = new URL("http://localhost/admin/member-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/member-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/member-management

Backend | Offer Management

APIs for managing offers

deleteOffer

Remove the specified resource from storage.

Example request:

curl -X POST "http://localhost/admin/offers-management/delete-offer" 
const url = new URL("http://localhost/admin/offers-management/delete-offer");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/offers-management/delete-offer", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/offers-management/delete-offer

index

Example request:

curl -X GET -G "http://localhost/admin/offers-management" 
const url = new URL("http://localhost/admin/offers-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/offers-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/offers-management

create

Example request:

curl -X GET -G "http://localhost/admin/offers-management/create" 
const url = new URL("http://localhost/admin/offers-management/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/offers-management/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/offers-management/create

store

Store a newly created resource in storage.

Example request:

curl -X POST "http://localhost/admin/offers-management" 
const url = new URL("http://localhost/admin/offers-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/offers-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/offers-management

edit

Show the form for editing the specified resource.

Example request:

curl -X GET -G "http://localhost/admin/offers-management/1/edit" 
const url = new URL("http://localhost/admin/offers-management/1/edit");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/offers-management/1/edit", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/offers-management/{offers_management}/edit

update

Update the specified resource in storage.

Example request:

curl -X PUT "http://localhost/admin/offers-management/1" 
const url = new URL("http://localhost/admin/offers-management/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/offers-management/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/offers-management/{offers_management}

PATCH admin/offers-management/{offers_management}

Backend | Reward Management

APIs for managing rewards

deleteReward

Remove the specified resource from storage.

Example request:

curl -X POST "http://localhost/admin/rewards-management/delete-reward" 
const url = new URL("http://localhost/admin/rewards-management/delete-reward");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/rewards-management/delete-reward", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/rewards-management/delete-reward

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/admin/rewards-management" 
const url = new URL("http://localhost/admin/rewards-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/rewards-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/rewards-management

create

Show the form for creating a new resource.

Example request:

curl -X GET -G "http://localhost/admin/rewards-management/create" 
const url = new URL("http://localhost/admin/rewards-management/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/rewards-management/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/rewards-management/create

store

Store a newly created resource in storage.

Example request:

curl -X POST "http://localhost/admin/rewards-management" 
const url = new URL("http://localhost/admin/rewards-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/rewards-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/rewards-management

edit

Show the form for editing the specified resource.

Example request:

curl -X GET -G "http://localhost/admin/rewards-management/1/edit" 
const url = new URL("http://localhost/admin/rewards-management/1/edit");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/rewards-management/1/edit", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/rewards-management/{rewards_management}/edit

update

Update the specified resource in storage.

Example request:

curl -X PUT "http://localhost/admin/rewards-management/1" 
const url = new URL("http://localhost/admin/rewards-management/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/rewards-management/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/rewards-management/{rewards_management}

PATCH admin/rewards-management/{rewards_management}

Backend | Settings

APIs for managing settings

postDefaultCover

Example request:

curl -X POST "http://localhost/admin/settings/default-cover" 
const url = new URL("http://localhost/admin/settings/default-cover");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/settings/default-cover", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/settings/default-cover

postDefaultAvatar

Example request:

curl -X POST "http://localhost/admin/settings/default-avatar" 
const url = new URL("http://localhost/admin/settings/default-avatar");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/settings/default-avatar", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/settings/default-avatar

postSocial

Example request:

curl -X POST "http://localhost/admin/settings/social" 
const url = new URL("http://localhost/admin/settings/social");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/settings/social", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/settings/social

postGeneral

Example request:

curl -X POST "http://localhost/admin/settings/general" 
const url = new URL("http://localhost/admin/settings/general");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/settings/general", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/settings/general

postPayment

Example request:

curl -X POST "http://localhost/admin/settings/payment" 
const url = new URL("http://localhost/admin/settings/payment");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/settings/payment", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/settings/payment

getIndex

Example request:

curl -X GET -G "http://localhost/admin/settings" 
const url = new URL("http://localhost/admin/settings");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/settings", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/settings

Backend | Tour Management

APIs for managing tours

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/admin/tours-management" 
const url = new URL("http://localhost/admin/tours-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/tours-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/tours-management

create

Show the form for creating a new resource.

Example request:

curl -X GET -G "http://localhost/admin/tours-management/create" 
const url = new URL("http://localhost/admin/tours-management/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/tours-management/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/tours-management/create

store

Store a newly created resource in storage.

Example request:

curl -X POST "http://localhost/admin/tours-management" 
const url = new URL("http://localhost/admin/tours-management");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/tours-management", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/tours-management

edit

Show the form for editing the specified resource.

Example request:

curl -X GET -G "http://localhost/admin/tours-management/1/edit" 
const url = new URL("http://localhost/admin/tours-management/1/edit");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/tours-management/1/edit", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/tours-management/{tours_management}/edit

update

Update the specified resource in storage.

Example request:

curl -X PUT "http://localhost/admin/tours-management/1" 
const url = new URL("http://localhost/admin/tours-management/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/tours-management/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/tours-management/{tours_management}

PATCH admin/tours-management/{tours_management}

Backend | User Management

APIs for managing users

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/admin/users" 
const url = new URL("http://localhost/admin/users");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/users", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/users

create

Show the form for creating a new resource.

Example request:

curl -X GET -G "http://localhost/admin/users/create" 
const url = new URL("http://localhost/admin/users/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/users/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/users/create

store

Store a newly created resource in storage.

Example request:

curl -X POST "http://localhost/admin/users" 
const url = new URL("http://localhost/admin/users");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/admin/users", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST admin/users

edit

Show the form for editing the specified resource.

Example request:

curl -X GET -G "http://localhost/admin/users/1/edit" 
const url = new URL("http://localhost/admin/users/1/edit");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/admin/users/1/edit", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET admin/users/{user}/edit

update

Update the specified resource in storage.

Example request:

curl -X PUT "http://localhost/admin/users/1" 
const url = new URL("http://localhost/admin/users/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->put("http://localhost/admin/users/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

PUT admin/users/{user}

PATCH admin/users/{user}

destroy

Remove the specified resource from storage.

Example request:

curl -X DELETE "http://localhost/admin/users/1" 
const url = new URL("http://localhost/admin/users/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->delete("http://localhost/admin/users/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

DELETE admin/users/{user}

Frontend | Blog Controller

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/blogs" 
const url = new URL("http://localhost/blogs");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/blogs", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET blogs

show

Display the specified resource.

Example request:

curl -X GET -G "http://localhost/blogs/1" 
const url = new URL("http://localhost/blogs/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/blogs/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET blogs/{blog}

Frontend | Booking Controller

checkout

Example request:

curl -X POST "http://localhost/hotels/rooms/checkout" 
const url = new URL("http://localhost/hotels/rooms/checkout");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/hotels/rooms/checkout", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST hotels/rooms/checkout

Frontend | Cocotel Controller

profile

Example request:

curl -X GET -G "http://localhost/cocotel-profile" 
const url = new URL("http://localhost/cocotel-profile");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/cocotel-profile", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET cocotel-profile

changeEmail

Example request:

curl -X POST "http://localhost/cocotel-profile/change-email" 
const url = new URL("http://localhost/cocotel-profile/change-email");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/cocotel-profile/change-email", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST cocotel-profile/change-email

changePass

Example request:

curl -X POST "http://localhost/cocotel-profile/change-pass" 
const url = new URL("http://localhost/cocotel-profile/change-pass");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/cocotel-profile/change-pass", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST cocotel-profile/change-pass

changeBasicInfo

Example request:

curl -X POST "http://localhost/cocotel-profile/change-basic-info" 
const url = new URL("http://localhost/cocotel-profile/change-basic-info");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/cocotel-profile/change-basic-info", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST cocotel-profile/change-basic-info

changeAdditionalInfo

Example request:

curl -X POST "http://localhost/cocotel-profile/change-additional-info" 
const url = new URL("http://localhost/cocotel-profile/change-additional-info");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/cocotel-profile/change-additional-info", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST cocotel-profile/change-additional-info

dashboard

Example request:

curl -X GET -G "http://localhost/cocotel-dashboard" 
const url = new URL("http://localhost/cocotel-dashboard");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/cocotel-dashboard", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET cocotel-dashboard

Frontend | Firebase Controller

logout

Example request:

curl -X GET -G "http://localhost/user-logout" 
const url = new URL("http://localhost/user-logout");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/user-logout", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET user-logout

join

Example request:

curl -X POST "http://localhost/join" 
const url = new URL("http://localhost/join");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/join", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST join

signin

Example request:

curl -X POST "http://localhost/sign-in" 
const url = new URL("http://localhost/sign-in");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/sign-in", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST sign-in

Frontend | Host Controller

postAddHotel

Example request:

curl -X POST "http://localhost/add-hotel" 
const url = new URL("http://localhost/add-hotel");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/add-hotel", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST add-hotel

postAddRoom

Example request:

curl -X POST "http://localhost/add-room" 
const url = new URL("http://localhost/add-room");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/add-room", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST add-room

getViewListing

Example request:

curl -X GET -G "http://localhost/listing/view" 
const url = new URL("http://localhost/listing/view");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/view", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/view

getListingIndex

Example request:

curl -X GET -G "http://localhost/listing" 
const url = new URL("http://localhost/listing");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing

getWalkin

Example request:

curl -X GET -G "http://localhost/listing/walkin" 
const url = new URL("http://localhost/listing/walkin");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/walkin", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/walkin

getWalkinCalendar

Example request:

curl -X GET -G "http://localhost/listing/calendar-walkin" 
const url = new URL("http://localhost/listing/calendar-walkin");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/calendar-walkin", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/calendar-walkin

postWalkin

Example request:

curl -X POST "http://localhost/listing/walkin" 
const url = new URL("http://localhost/listing/walkin");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/listing/walkin", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST listing/walkin

getSummaryWalkin

Example request:

curl -X GET -G "http://localhost/listing/summarywalkin" 
const url = new URL("http://localhost/listing/summarywalkin");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/summarywalkin", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/summarywalkin

getReservation

Example request:

curl -X GET -G "http://localhost/listing/reservation" 
const url = new URL("http://localhost/listing/reservation");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/reservation", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/reservation

getViewReservation

Example request:

curl -X GET -G "http://localhost/listing/viewreservation" 
const url = new URL("http://localhost/listing/viewreservation");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/viewreservation", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/viewreservation

getEditListing

Example request:

curl -X GET -G "http://localhost/listing/editlisting" 
const url = new URL("http://localhost/listing/editlisting");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/editlisting", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/editlisting

getEditReservation

Example request:

curl -X GET -G "http://localhost/listing/editreservation" 
const url = new URL("http://localhost/listing/editreservation");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/editreservation", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/editreservation

postSaveRates

Example request:

curl -X POST "http://localhost/dashboard/save-rates" 
const url = new URL("http://localhost/dashboard/save-rates");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/dashboard/save-rates", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST dashboard/save-rates

getCalendar

Example request:

curl -X GET -G "http://localhost/dashboard/calendar" 
const url = new URL("http://localhost/dashboard/calendar");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/calendar", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/calendar

getDashboardIndex

Example request:

curl -X GET -G "http://localhost/dashboard" 
const url = new URL("http://localhost/dashboard");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard

getDashboardHelp

Example request:

curl -X GET -G "http://localhost/dashboard/help-and-support" 
const url = new URL("http://localhost/dashboard/help-and-support");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/help-and-support", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/help-and-support

getDashboardPropertyDetails

Example request:

curl -X GET -G "http://localhost/dashboard/property-details" 
const url = new URL("http://localhost/dashboard/property-details");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/property-details", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/property-details

getDashboardReservations

Example request:

curl -X GET -G "http://localhost/dashboard/reservations" 
const url = new URL("http://localhost/dashboard/reservations");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/reservations", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/reservations

getDashboardRoomRates

Example request:

curl -X GET -G "http://localhost/dashboard/room-rates" 
const url = new URL("http://localhost/dashboard/room-rates");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/room-rates", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/room-rates

getDashboardAccountingRecon

Example request:

curl -X GET -G "http://localhost/dashboard/accounting/reconciliations" 
const url = new URL("http://localhost/dashboard/accounting/reconciliations");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/accounting/reconciliations", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/accounting/reconciliations

getDashboardAccountingRem

Example request:

curl -X GET -G "http://localhost/dashboard/accounting/remitance-advice" 
const url = new URL("http://localhost/dashboard/accounting/remitance-advice");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/accounting/remitance-advice", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/accounting/remitance-advice

getDashboardAccountingBilling

Example request:

curl -X GET -G "http://localhost/dashboard/accounting/billing-and-payment-settings" 
const url = new URL("http://localhost/dashboard/accounting/billing-and-payment-settings");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/dashboard/accounting/billing-and-payment-settings", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET dashboard/accounting/billing-and-payment-settings

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/create-room" 
const url = new URL("http://localhost/create-room");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/create-room", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET create-room

postAddProperty

Example request:

curl -X POST "http://localhost/property/add" 
const url = new URL("http://localhost/property/add");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/property/add", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST property/add

postDeclineHost

Example request:

curl -X POST "http://localhost/property/declineProperty" 
const url = new URL("http://localhost/property/declineProperty");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/property/declineProperty", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST property/declineProperty

getListProperty

Example request:

curl -X GET -G "http://localhost/property/add" 
const url = new URL("http://localhost/property/add");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/property/add", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET property/add

Frontend | Hotel Controller

getHotels

Example request:

curl -X GET -G "http://localhost/hotels" 
const url = new URL("http://localhost/hotels");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/hotels", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET hotels

getHotelInner

Example request:

curl -X GET -G "http://localhost/hotels/1" 
const url = new URL("http://localhost/hotels/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/hotels/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET hotels/{uid}

getSummary

Example request:

curl -X GET -G "http://localhost/hotels/1/rooms/1/summary" 
const url = new URL("http://localhost/hotels/1/rooms/1/summary");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/hotels/1/rooms/1/summary", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET hotels/{uid}/rooms/{key}/summary

getCheckout

Example request:

curl -X GET -G "http://localhost/hotels/1/rooms/1/summary/checkout" 
const url = new URL("http://localhost/hotels/1/rooms/1/summary/checkout");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/hotels/1/rooms/1/summary/checkout", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET hotels/{uid}/rooms/{key}/summary/checkout

postSummary

Example request:

curl -X POST "http://localhost/hotels/rooms/book" 
const url = new URL("http://localhost/hotels/rooms/book");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/hotels/rooms/book", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST hotels/rooms/book

Frontend | Login Controller

redirectToFacebook

Example request:

curl -X GET -G "http://localhost/login/facebook" 
const url = new URL("http://localhost/login/facebook");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/login/facebook", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET login/facebook

redirectToTwitter

Example request:

curl -X GET -G "http://localhost/login/twitter" 
const url = new URL("http://localhost/login/twitter");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/login/twitter", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET login/twitter

redirectToGoogle

Example request:

curl -X GET -G "http://localhost/login/google" 
const url = new URL("http://localhost/login/google");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/login/google", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET login/google

handleFacebookCallback

Example request:

curl -X GET -G "http://localhost/facebook/callback" 
const url = new URL("http://localhost/facebook/callback");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/facebook/callback", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET facebook/callback

handleTwitterCallback

Example request:

curl -X GET -G "http://localhost/twitter/callback" 
const url = new URL("http://localhost/twitter/callback");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/twitter/callback", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET twitter/callback

handleGoogleCallback

Example request:

curl -X GET -G "http://localhost/google/callback" 
const url = new URL("http://localhost/google/callback");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/google/callback", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET google/callback

Frontend | Main Controller

addHotel

Example request:

curl -X GET -G "http://localhost/add-hotel" 
const url = new URL("http://localhost/add-hotel");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/add-hotel", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET add-hotel

addRoom

Example request:

curl -X GET -G "http://localhost/add-room" 
const url = new URL("http://localhost/add-room");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/add-room", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET add-room

getIndex

Example request:

curl -X GET -G "http://localhost/" 
const url = new URL("http://localhost/");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET /

getAboutUs

Example request:

curl -X GET -G "http://localhost/about-us" 
const url = new URL("http://localhost/about-us");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/about-us", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET about-us

getContactUs

Example request:

curl -X GET -G "http://localhost/contact-us" 
const url = new URL("http://localhost/contact-us");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/contact-us", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET contact-us

getCocotelCares

Example request:

curl -X GET -G "http://localhost/cocotel-cares" 
const url = new URL("http://localhost/cocotel-cares");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/cocotel-cares", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET cocotel-cares

getPrivacyPolicy

Example request:

curl -X GET -G "http://localhost/privacy-policy" 
const url = new URL("http://localhost/privacy-policy");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/privacy-policy", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET privacy-policy

getTermsCondition

Example request:

curl -X GET -G "http://localhost/terms-condition" 
const url = new URL("http://localhost/terms-condition");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/terms-condition", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET terms-condition

getFAQ

Example request:

curl -X GET -G "http://localhost/faq" 
const url = new URL("http://localhost/faq");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/faq", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET faq

getOffers

Example request:

curl -X GET -G "http://localhost/offers" 
const url = new URL("http://localhost/offers");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/offers", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET offers

getBookConfirmed

Example request:

curl -X GET -G "http://localhost/book-confirmed" 
const url = new URL("http://localhost/book-confirmed");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/book-confirmed", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET book-confirmed

postContactUs

Example request:

curl -X POST "http://localhost/contact-us" 
const url = new URL("http://localhost/contact-us");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/contact-us", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST contact-us

getRedeem

Example request:

curl -X GET -G "http://localhost/redeem" 
const url = new URL("http://localhost/redeem");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/redeem", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET redeem

getCocotelBenefits

Example request:

curl -X GET -G "http://localhost/cocotel-benefits" 
const url = new URL("http://localhost/cocotel-benefits");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/cocotel-benefits", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET cocotel-benefits

getCocotelRedemptions

Example request:

curl -X GET -G "http://localhost/cocotel-redemptions" 
const url = new URL("http://localhost/cocotel-redemptions");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/cocotel-redemptions", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET cocotel-redemptions

getCocotelEliteClub

Example request:

curl -X GET -G "http://localhost/cocotel-elite-club" 
const url = new URL("http://localhost/cocotel-elite-club");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/cocotel-elite-club", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET cocotel-elite-club

getOffersInner

Example request:

curl -X GET -G "http://localhost/offers/1" 
const url = new URL("http://localhost/offers/1");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/offers/1", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

null

HTTP Request

GET offers/{id}

getJoin

Example request:

curl -X GET -G "http://localhost/join" 
const url = new URL("http://localhost/join");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/join", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET join

getSignIn

Example request:

curl -X GET -G "http://localhost/sign-in" 
const url = new URL("http://localhost/sign-in");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/sign-in", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET sign-in

Frontend | Property Controller

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/listing/properties" 
const url = new URL("http://localhost/listing/properties");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/properties", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/properties

create

Show the form for creating a new resource.

Example request:

curl -X GET -G "http://localhost/listing/properties/create" 
const url = new URL("http://localhost/listing/properties/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/properties/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/properties/create

store

Store a newly created resource in storage.

Example request:

curl -X POST "http://localhost/listing/properties" 
const url = new URL("http://localhost/listing/properties");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/listing/properties", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST listing/properties

Frontend | Review Controller

getIndex

Example request:

curl -X GET -G "http://localhost/reviews" 
const url = new URL("http://localhost/reviews");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/reviews", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

{
    "message": "Server Error"
}

HTTP Request

GET reviews

getEmailReview

Example request:

curl -X GET -G "http://localhost/reviews/1/email-review" 
const url = new URL("http://localhost/reviews/1/email-review");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/reviews/1/email-review", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET reviews/{id}/email-review

postEmailReview

Example request:

curl -X POST "http://localhost/reviews/1/email-review" 
const url = new URL("http://localhost/reviews/1/email-review");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/reviews/1/email-review", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST reviews/{id}/email-review

Frontend | Room Controller

index

Display a listing of the resource.

Example request:

curl -X GET -G "http://localhost/listing/rooms" 
const url = new URL("http://localhost/listing/rooms");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/rooms", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/rooms

create

Show the form for creating a new resource.

Example request:

curl -X GET -G "http://localhost/listing/rooms/create" 
const url = new URL("http://localhost/listing/rooms/create");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get("http://localhost/listing/rooms/create", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (302):

null

HTTP Request

GET listing/rooms/create

store

Store a newly created resource in storage.

Example request:

curl -X POST "http://localhost/listing/rooms" 
const url = new URL("http://localhost/listing/rooms");

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("http://localhost/listing/rooms", [
]);
$body = $response->getBody();
print_r(json_decode((string) $body));

HTTP Request

POST listing/rooms