Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 20, 2022 07:02 am GMT

Laravel Installation Example

Originally posted @ https://codeanddeploy.com visit and download the sample code: https://codeanddeploy.com/blog/laravel/laravel-installation-example

In this post, I will show you a Laravel installation using Windows. Usually, these steps can be applied to any machine. Take note that before we can install Laravel we need to have a Composer installed on your system.

Just follow the steps below to learn how to install Laravel onto your system.

Step 1: Composer Installation

Before installing Laravel we need to install the first composer if not yet installed on your system. Just click the link below to install it.

https://getcomposer.org/download/

Step 2: Verify Composer if Installed

Once the composer installs let's check to verify if our composer is successfully installed in our system.

laravel-installation

Once we run the composer command and display the composer's details then our composer is ready and let's install our Laravel project.

Step3: Directory Laravel Installation

Usually, if you are using Xampp install on your Windows we use htdocs directory to install our Laravel project. So let's open your htdocs folder to your XAMPP directory. In my example, I name my xampp folder to PHP8 because I already have multiple versions of PHP in my system.

Open your command prompt then point to your xampp directory then run this command:

cd htdocs

laravel-installation

Once you are inside the htdocs directory let's install a Laravel project.

Run the following command:

composer create-project laravel/laravel laravel-blogs

As you can see in my command the name of our Laravel project is laravel-blogs you can change it with your project name.

laravel-installation

Now, we installed successfully our Laravel project.

Step 4: Run Artisal after Laravel installation

Let's access our Laravel installed folder called laravel-blogs so that we will test to run our artisan command.

Run the following commands:

cd laravel-blogs

Next, run the artisan command:

php artisan serve

Step 5: Laravel Installed Project Running

Once we hit the command above our Laravel project is now running. See the below screenshot.

laravel-installation

Step 6: Run on Browser

Now, let's copy the URL http://127.0.0.1:8000/ to your browser. And this is the result now:

laravel-installation

As you can see we successfully installed Laravel with Laravel 8 version.

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/laravel/laravel-installation-example if you want to download this code.

Happy coding :)


Original Link: https://dev.to/codeanddeploy/laravel-installation-example-cgp

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To