Welcome to the Beginner Guide to Install Laravel on Your Operating System!
Are you eager to delve into web development with Laravel but feeling a bit overwhelmed by the installation process? Fear not! This guide is presented by ADMEC Multimedia specifically for learners like you who are beginner and need practical step by step guidance for installing Laravel.
In this comprehensive walkthrough, we’ll break down the installation process into simple, easy-to-follow steps, ensuring that you can set up Laravel on your operating system with confidence. This guide is mainly targeted on installation for windows operating system.
By the end of this guide, you’ll have Laravel up and running on your system, ready to embark on your journey towards building dynamic web applications with one of the most popular PHP frameworks out there.
Before we move forward with installation, let’s first dive in some necessary prerequisites.
Pre-requisites to Install Larvel
Here are a few prerequisites that you need a lot for install Laravel:
- PHP: It is the most crucial language and should to be installed first. The recommended version for PHP is 7.3 or higher than it. You can consider adding other extensions like XML, OpenSSL, PDO, etc.
- Composer: Next is Composer which sets the group for the installation of both Laravel and its dependencies. It is also a dependency manager for PHP, thus becoming necessary.
- Web Server: Along with PHP and Composer, web servers play a crucial role in the installation of Laravel. You can try adding web servers like Apache for the applications going to the run under Laravel.
- Database: How can we forget database? Do you know that Laravel can work with multiple database systems which not only include MySQL, SQLite but also MongoBG and other SQL Server?
- Node.js and NPM: Although not strictly required, Node.js and NPM (Node Package Manager) are often used for front-end development tasks like compiling assets and managing JavaScript dependencies in Laravel projects.
By ensuring you have these prerequisites installed and configured correctly, you’ll be all set to install and start using Laravel for your web development projects!
New to PHP, Node.js, or Database Management?
If you’re feeling a bit overwhelmed by the prerequisites for installing Laravel or unsure about PHP, Node.js, or managing databases like MySQL or MongoDB, don’t worry – we’ve got you covered!
At ADMEC Multimedia, we offer comprehensive courses in PHP, Node.js, and database management, designed specifically for beginners like you.
Whether you’re interested in mastering PHP for server-side scripting, harnessing the power of Node.js for scalable web applications, or diving into database management with MySQL or MongoDB, our courses provide hands-on learning experiences that will empower you to succeed in your web development journey.
Explore our courses and kickstart your learning today!
PHP Course | Node.js Course | Database Management Course
Don’t let unfamiliar prerequisites hold you back – enroll in our courses and take the first step towards becoming a proficient web developer!
Steps to Install Laravel on Windows
To install Laravel on Windows, first, we have to download the composer from the get composer website, as we’ve read above, it will help us to install Laravel. We should have PHP 7 or above to install the Laravel.
1. Install composer
Download the composer from it’s official website, and start the setup. It will ask you for the PHP path just shown in the below image:
Then press next and install the composer, after installing it successfully we can check the version of the composer in the command prompt by using this command:
Composer - v
It will show some information as shown in below attached graphic for reference:
With this step, we’ve got everything set to install the Laravel in your operating system.
Follow the provided steps with good attention for right installation:
2. To install the Laravel we should use at least PHP 7.3 version
We can check the version of PHP in command prompt of windows by using:
PHP –v command
3. Install Laravel
After downloading the composer and installing it in the windows, we have to start the installation process of the Laravel. We can follow the below-mentioned commands to install laravel:
Composer create-project –prefer –dist laravel/laravel Project_Name
This command will install Laravel and also make a new project with the given name of the project.
4. Create the PHP database in MySQL
After installing Laravel, we have to create the database in the PHP server, just go to the MySQL server, create a new database.
5. Update. Env file
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:TJ9Sob7KFPhL5XkqT+TyQux3x7UbW08QLb0xtirLWSs=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=first-laravel
DB_USERNAME=root
DB_PASSWORD=
6. Migrate database
After creating the database for Laravel, we will create a migration table. To make a migration table we will use the command as:
php artisan migrates the above command
This Command will create the pending migration changes to the database.
7. Start the development server of the Laravel
To start the server of the Laravel we have a command to run:
php artisan serve
This command will start the server of the Laravel, as we can see in the image reference below:
Now we can copy this localhost URL and paste it into the browser then we can see the welcome page of the Laravel.
Ready to Take Your Laravel Skills Further?
Explore advanced Laravel techniques with ADMEC Multimedia’s certificate course. Master MVC architecture and build robust web applications with PHP Laravel.
Or you have another way! Why not consider the bigger picture?
Our 24-month Web Design and Development Course at ADMEC Multimedia offers far more than just a single framework installation.
Don’t limit yourself to just one framework – expand your horizons and become a well-rounded web developer with our comprehensive course at the Web Development Institute in Delhi.
Conclusion
That’s how we can install Laravel on a Windows machine successfully, start with the composer installation and that will help us to install Laravel on our Windows operating system machine. Follow all of the above-mentioned steps to install Laravel on your Windows system but make sure that, you already have a localhost server and PHP, and MySQL Installed on your system because Laravel uses PHP and MySQL to complete it’s installation process. So if you don’t have it in your machine first install them after that follow the steps of installing Laravel on your machine.
Stay updated with more such blogs with our newsletter.