##Description Learning Centre Web Application for Faculty of Computer Science at Dalhousie
#####Feel free to modify it for your own faculty or needs.
##Installation ###Prerequisites
- Install Git
- Windows:
- Linux (Ubuntu):
sudo apt-get install git
- Mac:
- Installed by default
- Install WAMP,LAMP or MAMP (Apache, MySQL, PHP 5.4):
- Make sure you can run PHP in the Command Line
- Enable the openssl and Mcrypt modules in PHP
- Enable the rewrite_module in Apache
###Instructions
- Open Terminal/Command Line/Git Bash
- Change to the folder where you store your PHP code (Usually htdocs or www).
- run
git clone https://github.com/andreykul/learningcentre.git
. - Enter the Folder created.
- run
php composer.phar install
to install dependencies. - [Optional] Open PhpMyAdmin create a new database called "learningcentre"
- Create a file
app/config/database.php
and copy database.php into it- Modify the following in the MySQL section to match your database:
- host
- database
- user
- password
- Modify the following in the MySQL section to match your database:
- [Optional] Modify
app/config/mail.php
to send actual emails - run
php artisan migrate
to update your database - run
php artisan db:seed
to populate the tables - You should have now have two accounts:
- Email: "[email protected]" , Password: "password"
- Email: "[email protected]" , Password: "password"
- Email: "[email protected]" , Password: "password"
- Email: "[email protected]" , Password: "password"
- You should be able to access the project in your browset at:
http://localhost/learningcentre/public
orhttp://localhost:8888/learningcentre/public
orhttp://localhost:[port]/learningcentre/public
- Modifications to
public/.htaccess
might be needed to work correctly
##Database ###Migrations
- Update tables
- run
php artisan migrate
- run
- Reset tables
- run
php artisan migrate:refresh
- run
- Remvoe tables
- run
php artisan migrate:reset
- run
- Undo last table change
- run
php artisan migrate:rollback
- run
- Manual reset (If migrations fail to work)
- Open PhpMyAdmin and remove each table manually
- run
php artisan migrate
###Populate/Seed
- run
php artisan db:seed
##Development
- New Issue Branch
git checkout -b issue-#
git push -u origin issue-#
- Working on somebody's branch (Will download their branches)
git fetch
- Merge problems
- You will be given your code and the other code sepperated with special symbols.
- Decided what part to remove and what to keep
- Add and Commit
- You are good to go, push
- Working with Emails
- If you want to see the email that is sent in pretend mode
- First change the mailer.php to display the body of the message as explained here.
- You are able to view the pretend emails at "app/storage/logs"