Giter Club home page Giter Club logo

real-estate-app's Introduction

Real Estate API Project

Project Overview

This project is a RESTful API for managing real estate properties. It allows users to list, create, show, update, and delete real estate properties. The project is built using Laravel, a PHP framework known for its elegant syntax and robust features.

Why Laravel?

Laravel was chosen for this project due to its:

  • Comprehensive ecosystem and a rich set of features.
  • Strong ORM (Eloquent) which simplifies database interactions.
  • MVC architecture which organizes the codebase efficiently.
  • Built-in support for RESTful APIs.

Features

  • List Properties: Fetch a list of all properties with limited details (ID, name, type, city, and country).
  • Show Property: View detailed information about a specific property.
  • Create Property: Add a new property to the database.
  • Update Property: Modify details of an existing property.
  • Delete Property: Soft delete a property, making it unavailable in the general list but still stored in the database.

Technology Stack

  • Backend: Laravel (PHP)
  • Database: MySQL
  • Testing: PHPUnit for feature testing.

Installation and Setup

  1. Clone the Repository

    git clone https://github.com/your-username/real-estate-api.git
    cd real-estate-api  
  2. Install Dependencies

    composer install
  3. Set Up Environment

    Make sure the table is created and .env file has correct permission to access the data

  4. Generate Application Key

    php artisan key:generate
  5. Run Migrations

    php artisan migrate
  6. Seed the Database (Optional)

    php artisan db:seed
  7. Running the Project

    php artisan serve

This will start the Laravel development server. The API will be available at http://localhost:8000.

Testing

Run the PHPUnit tests with:

php artisan test

API Endpoints

Method Endpoint Description
GET /api/real-estates List all real estate properties
GET /api/real-estates/{id} Show a single real estate property
POST /api/real-estates Create a new real estate property
PUT/PATCH /api/real-estates/{id} Update a real estate property
DELETE /api/real-estates/{id} Delete (soft) a real estate property

real-estate-app's People

Contributors

yashtomar31 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.