Coder Social home page Coder Social logo

turkmvc / real-estate-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zoltan-nz/real-estate-app

0.0 1.0 0.0 204 KB

A Real Estate App, experiment in Laravel MVC framework.

CoffeeScript 0.79% CSS 24.48% PHP 15.07% JavaScript 56.92% HTML 2.70% ApacheConf 0.04%

real-estate-app's Introduction

Real Estate App

Installation

This application built in Laravel 4.0 MVC framework.

Create a clone or copy in your localhost.

Install composer. (More details here: link)

In your local console step in real-estate-app directory. And run composer install and composer update

composer install
composer update

Setup your MySQL server. You have to have a database, called: 'real_estate_app'. MySQL script in root folder.

CREATE DATABASE real_estate_app;

Setup database access in 'app/config/database.php'. Default username and password is root.

'mysql' => array(
    'driver'    => 'mysql',
    'host'      => isset($_SERVER['DB1_HOST']) ? $_SERVER['DB1_HOST'] : 'localhost',
    'database'  => isset($_SERVER['DB1_NAME']) ? $_SERVER['DB1_NAME'] : 'real_estate_app',
    'username'  => isset($_SERVER['DB1_USER']) ? $_SERVER['DB1_USER'] : 'root',
    'password'  => isset($_SERVER['DB1_PASS']) ? $_SERVER['DB1_PASS'] : 'root',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
),

Run Laravel migration command. This command create your database.

php artisan migrate

Run Laravel seed file command. Upload default values in database.

php artisan db:seed

Run the application

php artisan serve

Open the application in browser

http://localhost:8000

For assess management need nodejs, bower and grunt. CoffeeScript and SASS built, but if you want to update need grunt in your local machine.

###Requirements:

  1. Property listing website.
    • front end
    • admin back end.
    • PHP and MySQL
  2. Index page:
    • Filter search form.
    • List of properties.
    • Filters: county, price, house type
  3. Admin page
    • protected with login
    • add/update/delete properties
    • add photograph to property
    • boolean sold or not
  4. Database
    • House types: detached, semi-detached, terraced
    • Min. 3 address lines and county (Dublin suburbs and postal codes are not required.)
    • Listing creation date and updated date should be stored and displayed.
    • No requirement to manage admin users. adminuser table: username: ‘admin’, password: ‘letmein’
  5. UI
    • bootstrap
    • templating engine
  6. Documents:
    • compressed zip file
    • instructions
    • sql setup

Database Model

            ---------------     ----------------    -----------------
            ¦ HOUSE_TYPES ¦ --> ¦  PROPERTIES  ¦ <--¦  SALES_TYPES  ¦
            ---------------     ----------------    -----------------
                                        ^
                                        ¦
                                ----------------
                                ¦    CITIES    ¦
                                ----------------
                                        ^
                                        ¦
                                ----------------
                                ¦    COUNTIES  ¦
                                ----------------



properties:

    belongs_to -> city
    belongs_to -> sales_type

    id                  :integer
    title               :string
    details             :text
    price               :integer
    sales_type_id       :integer
    city_id             :integer
    address_1           :string
    address_2           :string
    address_3           :string
    number_of_beds      :integer
    number_of_baths     :integer
    pet_allowed         :boolean
    dishwasher          :boolean
    furnished           :boolean
    created_at          :datetime
    updated_at          :datetime

counties:

    has_many    -> cities

    id                  :integer
    name                :string

cities:

    belongs_to  -> county
    has_many    -> properties

    id                  :integer
    name                :string
    county_id:          :integer

house_types:
    (detached, semi-detached, terraced)

    has_many    -> properties

    id:                 :integer
    name                :string

sales_types:
    (sale, rent, share)

    has_many    -> properties

    id                  :integer
    name:               :string

users:
    id                  :integer
    username            :string
    password            :string
    admin               :boolean

Installation

composer update
bower update

Database management commands

php artisan migrate:reset
php artisan migrate
php artisan db:seed

Run development environment

grunt
php artisan serve

Deploy on heroku

Source

Add database configuration in /app/config/heroku/database.php Information from heroku postgres database settings...

<?php
// database.php
return array(
    'fetch' => PDO::FETCH_CLASS,
    'default' => 'pgsql',
    'connections' => array(
        'pgsql' => array(
            'driver'   => 'pgsql',
            'host'     => '',
            'port'     => '5432'
            'database' => '',
            'username' => '',
            'password' => '',
            'charset'  => 'utf8',
            'prefix'   => '',
            'schema'   => 'public',
        ),
    'migrations' => 'migrations',
);

real-estate-app's People

Contributors

zoltan-nz 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.