For Laravel Installation you need to install the following:
- Xampp (For PHP)
- Composer
- Laravel
Installing PHP
Laravel is built on PHP, a server-side scripting language. Laravel can’t function without PHP, as PHP interprets the code and interacts with the server to display content dynamically.
You can download the xampp from https://www.apachefriends.org/download.html
for Xampp Installation visit: https://phpgurukul.com/how-to-install-xampp/
Installing Composer
Composer is a dependency manager for PHP. Laravel relies on various external packages, which are managed by Composer, allowing you to easily install, update and manage these packages as your project grows.
Download the Composer from here: https://getcomposer.org/download/
After downloading run the composer setup installer, which will automatically add Composer to your PATH.
Installing Laravel
With PHP and Composer in place, you are ready to install Laravel. There are two main ways to create a new Laravel project: using the Laravel installer (installed globally) OR by creating the project directly with Composer.
Method 1: Installing Laravel Globally
Laravel provides its installer, which makes creating new projects quick and easy.
1. Install the Laravel Installer
composer global require laravel/installer
2. Create a New Laravel Project
laravel new myproject
Replace myproject with the name you want for your project. Laravel creates a new folder with all the necessary files and dependencies.
Method 2: Creating a Laravel Project with Composer
If you don’t want to install Laravel globally, you can also create a new project using Composer directly.
composer create-project laravel/laravel myproject
This command will download and set up Laravel in a new folder named myproject.
Move into your project directory as shown below:
cd myproject
Start the Server by the following command:
php artisan serve
This will start the local development server, accessible at http://localhost:8000
The post Installing Composer and Laravel appeared first on PHPGurukul.
Source: Read MoreÂ