Magic Property
Let’s find your new home, room, office, shop or empty land!
I. Installation instruction (For developing team)
- Clone project
git clone https://github.com/MagicLabsVN/magicproperty.git - Go to project directory
cd magicproperty - Run
composer installto install vendors - Grant permission to write to bootstrap/cache and storage directories and their sub directories
chmod -R 777 bootstrap/cachechmod -R 777 storage
II. Configuration
-
Copy & rename .env.example to .env:
cp .env.example .env -
Generate app key:
php artisan key:generate(generated key will be added to your .env file automatically) -
More configurations in .env file:
APP_ENV=local(or production )APP_DEBUG=true(or false to disable debuging bar)APP_KEY=(Will be generate automatically by command)DB_HOST=localhostDB_DATABASE= Your database nameDB_USERNAME= Your database user nameDB_PASSWORD= Your database password
III. Data migration
Make sure database connection is configured correctly
- Migrate database structure:
php artisan migrate - Seed data:
php artisan db:seed - Generate migration from existed table:
php artisan migrate:generate <table-name> - Generate data seeding from existed table:
php artisan iseed <table-name>
IV. Composer commands
Following composer commands are frequently used in this project:
-
composer installinstalls the vendor packages according to composer.lock (or creates one if not present) -
composer updateregenerates composer.lock and installs the latest versions of available packages -
composer dump-autoloadregenerates the list of all classes need to be included. Used it when there are new classes inside the project. -
composer dump-autoload -ofaster loading web pages.