How To Install Laravel
Laravel is a popular PHP web application framework, known for its simplicity, powerful features, and active community support. It streamlines web development, making it easier to create robust and secure applications efficiently. In this tutorial, we will install Laravel on our local computer.
Installing Laravel In Windows
First of all you'll need to setup local development server on your pc, for that you can download and install XAMPP. I suggest you to install XAMPP with php version 8.2
XAMPP stands for "Cross-Platform (X), Apache (A), MySQL (M), PHP (P), and Perl (P)." It is a popular open-source software package that provides a complete development environment for web developers. XAMPP includes essential components like the Apache web server, the MySQL database management system, PHP (a server-side scripting language), and Perl (a general-purpose scripting language).
After installing XAMPP, you'll need to download composer which is package manager for php. To install Laravel and other packages you will need composer.
You can download composer manually and install it on your computer.
After Installing composer verify it using command prompt tool. Go to command prompt and type composer and hit enter. If you see the output as below then you have successfully installed composer on your pc.
Now check the php version on your composer using command prompt and enter php -v and hit enter. If the output shows you php version then you are good to go.
Now that you have installed composer on your computer you can install Laravel on your local computer. You can install Laravel in two ways.
composer global require laravel/installer
Using this command you can install Laravel on your pc and then you need to use the following command to create a Laravel Project.
laravel new project-name
Otherwise you can use composer command to create a Laravel project.
composer create-project laravel/laravel project-name
Installing Laravel in Linux/Mac
You can follow the same steps mentioned for windows. You can download XAMPP for local development server or you can install LAMP stack on your computer.
What's Next
Now, you have successfully installed Laravel on your local computer, you can create Laravel project.
Conclusion:
Now you have successfully installed Laravel on your local computer and you can create Laravel project on your local computer.
If you want to hire me for your project then contact me.