Skip to content

afraym/danubiorealestate

Repository files navigation

Danubio Realestate API 🏠

A simple Realestat inentory managemnt API build on PHP Laravel

Run Locally

Clone the project

  git clone https://github.com/afraym/danubiorealestate.git

Go to the project directory

  cd danubiorealestate

Install dependencies

  composer install

copy .env.example to .env and add your database info

Migrate database

  php artisan migrate

Start the server

  php artisan serve

API Reference

Add new Property

  POST api/properties
Parameter Type Description
name string Required. Name of property
type string Required. Type of property ApartmentorHouse
address string Required. Address of property
bedrooms integer Required. Number of bedrooms of the property
size integer Required. Size of property
size_type integer Required. Size type of property options : sqft and sqm
price integer Required. Price of property
lat integer Optional. Latitude of property
lon integer Optional. Longitude of property

Get all properties

  GET api/properties

Get property by id

  GET api/properties/{id}

Update Property

  PUT|PATCH api/properties/{id}
Parameter Type Description
name string Optional. Name of property
type string Optional. Type of property ApartmentorHouse
address string Optional. Address of property
bedrooms integer Optional. Number of bedrooms of the property
size integer Optional. Size of property
size_type integer Optional. Size type of property options : sqft and sqm
price integer Optional. Price of property
lat integer Optional. Latitude of property
lon integer Optional. Longitude of property

Delete Property

DELETE  api/properties/{id}

Search properties

  GET api/search/

Search properties by any parameters of the table below

Parameter Type Description
name string Optional. name of property
type string Optional. Type of property ApartmentorHouse
address string Optional. Address of property
size integer Optional. Size of property
size_type integer Optional. Size type of property options : sqft and sqm
bedrooms integer Optional. number of bedrooms of property

Search properties geographically

To search Properties by a geographical (Lat/Lon) point and a radius distance from it

Parameter Type Description
lon integer Required Longitude
lat integer Required Latitude
radius integer Required Radius distance

Features to be added later

  • Authentication
  • Property Image upload
  • Property to user relationship
  • Property Video Previews

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages