For all the beginners that are starting on the portal, this is for you to get started.
Git should come pre-installed in Linux and macOS. For Windows, use this link After you've successfully installed, you can verify the installation using:
git --version
# git version 2.33.0.windows.2
Portal uses PHP v8.2. You can install it using one of the following ways:
If you are a Window's user we would suggest you to use WAMP over XAMPP for portal as it is easier to control/change the version of PHP, MySQL, and Apache
-
XAMPP (Windows and Linux)
- If you prefer using XAMPP, you can download the full stack with right PHP version from this link.
- If you already have XAMPP installed for Windows, refer this link for switching to the correct PHP version.
- If you already have XAMPP installed for Ubuntu, refer this linkfor switching to the correct PHP version.
-
WAMP (Windows)
- If you prefer using WAMP Windows(64-bit and 32-bit), you can download from this link. A possible error may arise with openSSL extension in older versions. It should be enabled from your 'php.ini' file. To enable it, use the following steps:
- Edit the system environment variables by right-clicking your windows icon most likely on the bottom-left of your screen, click on system, on the right under related settings click on Advanced System Settings, under Advanced tab click on Environment Variables, under System variables click on new or edit, to add new click on new and in th variable name write your phpversion eg php8.0.26 or just php, click on browse directory go to this pc / local disk c:/wamp/bin/php and select a php version directory you want to use use any greater than 7, click ok and the path of your selected PHP version will be set.
- 'php.ini' can be found in thispc/localdisk c/wamp/bin/phpversion you have selected
- In 'php.ini' (older versions), if ";extension=openSSL" is present, uncomment the ";extension=openSSL" by removing ";" before it.
- The WAMP users have to right click on the server icon in the toolbar, and choose ‘Restart all services’ after making changes to the 'php.ini' file.
- Run this command in the root directory of your project if composer already installed on your system:
composer update
- If the user is working in VSCode, possible errors may arise because of path, as may not be able to access the selected PHP version from its terminal.
-
MAMP (macOS)
-
After you've successfully installed, you can verify the installation using:
php -v
# output should be something like
# PHP 8.2.0 (cli) (built: Dec 9 2022 16:30:32) (NTS)
Before you start building PHP connection to MySQL database you need to know what phpMyAdmin is. It’s a control panel from where you can manage the database that you’ve created.
-
Open your browser and go to localhost/phpmyadmin.
-
Just click Login
-
At the top click databases.
-
In the new window, name your database as per your need, we are naming it “portal”. Now select Collation as utf8_general_ci. Now click on Create and your database will be created. Check out this link and skip to 0:21.
-
The newly created database will be empty now, as there are no tables in it.
-
Create a Folder in htdocs - Now, locate the folder where you installed XAMPP and open the htdocs folder (usually c:/xampp). Create a new folder inside c:/xampp/htdocs/ and name it “portal” we will place web files in this folder.
-
Why we have created a folder in htdocs?
- XAMPP uses folders in htdocs to execute and run your PHP sites.
-
For WAMP - Add your practice folder in c:/wamp/www folder.
- For both XAMP and WAMP: If you’re asked to log in into your phpMyAdmin, use the username “root” and enter your root password. If you haven’t set one yet, you can leave it blank.
For MAMP: Name: This is the host name. The default host is ‘localhost’.
Username: This is your MySQL username. Your MySQL username will be ‘root’ if you have not changed the default username setup in MAMP.
Password: This is your MySQL password.Your MySQL username password will be ‘root’ if you have not changed the default password setup in MAMP.
TablePlus is an easy-to-use database manager for Windows and Mac.
- Download and Install TablePlus.
- For Mac - Download TablePlus
- For Windows - Download TablePlus
-
Create a New Connection - Choose “Create a new connection…” then pick MySQL and click Create.
-
Copy the host, socket, database name, username, and password into the MySQL Connection window from the .env file in the root folder of your project.
-
Check “Use socket” before copying the socket details.
-
After copying your site details from Local, click “Test”. You should see several green fields if the connection was established successfully. If so, click “Connect” and start editing!
For MacOS:
For Windows:
For Linux:
After you've successfully installed, you can verify the installation using:
composer --version
# output should be something like
# Composer version 2.1.6 2021-08-19 17:11:08
In case your composer version is different, run this command to change the version
composer self-update 2.1.6
For (Windows, Ubuntu, macOS)
- Nodejs v18. Download and install the file with .msi extension if on windows. After you've successfully installed, you can verify the installation using:
npm -v
# output should be something like
# 9.5.1
node -v
#output should be somthing like
#v18.16.0
Install the following extensions and packages based on the code editor you use:
-
Visual Studio Code Editor:
-
Sublime Code Editor:
There are some topics and tools you need to know to prior to work in portal so please make sure to check this out.
Version control, also known as source control, is the practice of tracking and managing changes to software code.
More about version control system
This project uses Laravel Modules, so a basic understanding of the commands is recommended:
This project uses Cypress for automated testing, so a basic understanding of the writing test cases is recommended: