.
PHP, Composer and Laravel Installation
Setting up your computer for PHP frameworks development could be frustrating if the steps are not working. This tutorial aims to provide easy step-by-step guide to setup PHP frameworks such as Laravel.
This tutorial uses Rapid Extension Editor (REE) to modify Windows Environment Path values.
|
1) Download PHP Package.
2) Configure PHP.INI
Unzip the file into the computer eg C:\php.
Copy the php.ini-development into php.ini
Edit at the following two lines...
Ensure that the extension directory is set to ext
Uncomment the openssl directive
Add the PHP Path value to Windows (using REE)
Click Save button.
Run Windows Command (ie Press Windows Button, type cmd and press ENTER).
Type php --version.
Type php -r "echo OPENSSL_VERSION_NUMBER;"
3) Install composer
Let’s say we want to install composer at c:\composer
Change directory to C:\ (type cd \).
Type mkdir composer.
Change directory to composer (type cd composer)
Type php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
We are going to create a composer batch file so that we can call composer from any directory. Type echo @php "%~dp0composer.phar" %*>composer.bat
Add the Composer Path value to Windows (Using REE).
Click Save button.
Run a new Windows Command.
Type composer -V
4) Install Laravel
While in Windows Command, type composer global require "laravel/installer".
A folder named “laravel” has been created in C:\users\{your-username}\AppData\Roaming\Composer\vendor
By right, Laravel executable file is located in c:\users\{your-username}\AppDate\Roaming\Composer\vendor\bin\.
You can test this by going to the path and type laravel.
Copy this path value for the next step
Add Laravel Path value to Windows (Using REE)
Test again in a new Windows Command.
5) Remove Laravel
While in Windows Command, type composer global remove "laravel/installer"
Since you have removed laravel, don’t forget to delete the path value in Windows as well.
.