The purpose of this manual is to explain the pre-requisites and the steps to install and host the web application locally.
The setup involves and requires the following tools:
- Window PowerShell or Git Bash CLI
- XAMPP or WAMPP
- PHP
- Laravel-CanteenOrderingSystem
- canteen (root)
- canteen.sql
- CanteenOrdering System.vpp (UML)
- README.md
-
Copy and paste the project 'canteen' to the following folder: \...\xampp\htdocs\...
-
In the project's root folder, find and open the .env file with any text editor.
-
Before editing the .env file, open your XAMPP or WAMPP control panel and find out the ports used for both Apache module and MySQL module.
-
Within the .env file, configure the following if need be:
- at line 5, APP_URL: http://localhost
- at line 10, DB_HOST:127.0.0.1
- at line 11, DB_PORT:3306
- at line 12, DB_DATABASE: canteen
- at line 13, DB_USERNAME: root
- at line 14, DB_PASSWORD:
The settings above are all following the default configurations from a fresh XAMPP. Change accordingly if the settings are different from the one you are using right now. If you previously tinker with vhost in the httpd-vhosts.conf file in \..\xampp\apache\conf\extra\... then do check and make sure it references the canteen's root folder.
-
Once done, verify whether the root folder is accessible by entering its path in any browser. For example, entering localhost/canteen/ should be able to see the root folder.
-
Next, go to phpmyadmin via http://loaclhost and create a database named 'canteen' and choose the 'Collation' from default 'utf-8' option.
-
Now, import the canteen.sql outside the root folder to seed the database so that the website can run properly. Once import is done, you should see that the database is now officially ready with all the relevant tables and its records.
-
There's still another step to allow the website up and running properly. Go to the root folder of the system and open Windows PowerShell via Shift + Right Click. Make sure that the php.exe path is in the PATH environment variable. In the shell, type the following command: php artisan storage:link. Again make sure you are opening the shell in the root!
-
It's all set now! Enter 'localhost/canteen/public' or the URL you set in the browser.
-
Here are the prepared account's credentials:
- Customer
- Email: [email protected]
- Password: 123
- Staff
- Email: [email protected]
- Password: 123
- Manager
- Email: [email protected]
- Password: 123
- Customer
In the offchance there are issues with storage_path(framework_session), check and make sure the folder exists by checking it via \..\htdocs\canteen\storage\framework\. Else, create a session folder. Then, run the following commands in the root folder:
php artisan view:clear
php artisan config:clear
php artisan config:cache
- Nicholas Ng Yee Jet
- Darryl Tan Zhe Liang
- Yohannes Luke Koh
- Wong Chuen Ting
The Laravel framework is open-source software licensed under the MIT license.