Create first Laravel 5.5 application using Composer
01. Download and install XAMP on our machine.
Why we use XAMP?
Laravel is a PHP framework and, PHP program can be run under various software like WAMP, MAMP, XAMP etc. That’s why we use XAMP on our machine.
- Go to this link: https://www.apachefriends.org/download.html
- Then, select latest version of the XAMP according to your Operating System and download installer.
- After downloading the file, install XAMP on your machine.
- Finally, check PHP verson running “php -v”.
If you can see this message, you have successfully installed XAMP. Then, we have to install composer.
02. Install composer
Why we use composer?
Composer is a package manger for PHP. It is very difficult to manage dependencies when working with latest frameworks like Laravel, Symfony etc.. By using composer, we can download and install all dependencies.
- Go to this link, https://getcomposer.org/download/
- Then, download composer installer.
- After that, install composer by running the installer.
- Open the command prompt and run “composer -v” to check composer version.
If you can see this message, you have successfully installed composer on you machine.
Usually, I install Laravel applications on my C:\xampp\htdocs directory. You can use whatever directory that you want.
3. Install new Laravel application
- Then, Open the command prompt and navigate to your folder.
- Type “composer create-project laravel/laravel FirstLaravelApplication “5.5.*” and hit enter.
As you can see, all the dependencies will be download and installed on your machine.
To serve our application, just type “php artisan serve”.
Application run on http://127.0.0.1:8000.
Finally, we just installed our Laravel 5.5 application. I you feel this tutorial was helpful, don’t forget to share. Also, If you have any question feel free to comment. Thank you for reading.