How to install Laravel 5.5 in Windows 10

Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller architectural pattern. This is a short and easy tutorial to install Laravel 5.5 for beginners.

Step 1: Instal Xampp and Composer

Now we can start the installation. First of all, we need to install Php. Luckily Xampp comes with PHP and other stuff which we require for this installation like MySQL and Apache server. So, we can download Xampp first. Go to https://www.apachefriends.org/download.html and make sure you download the latest version of Xampp (check whether it includes the latest version of PHP). Once you have downloaded it install it in your favourite directory.

Next, we need to install Composer. Go to https://getcomposer.org/download/ and click on 'Composer-Setup.exe', this will automatically start the download. Once you have downloaded it you need to install it inside the Xampp directory where you have just installed Xampp. Make sure you have selected 'C:/xampp/php/php.exe' (where ever you have installed it) and click install. 

Once you have installed Xampp and Composer test it by opening a new command prompt and trying 'php -v' for testing PHP has been successfully installed and 'composer' for testing composer has been successfully installed. If any of them didn't give a not found as an internal or external command error then both of them have been successfully installed.

Step 2: Start Apache and MySQL

This is an important step and you need to do it every time you restart your system. Open the Xampp control panel and click the start button for Apache and MySQL and make sure they become green. Go to localhost and make sure you get a welcome message from Apache and go to localhost/phpmyadmin for checking whether MySQL is running properly or not.

Step 3: Install Laravel command and create a new project

Run this command in your command prompt and that is all it takes to install Laravel command to your environmental variables.

composer global require "laravel/installer"

Now we can create a fresh Laravel project. Make sure you run this command for every new project that you are creating. Replace the <folder-name> with your desired folder name.

laravel new <folder-name>

And there you go you have successfully installed Laravel on your system and created your first app. I will give you some additional tips since you are a beginner and really doesn't know much about Laravel's functionality.

Additional tips

So this one actually not necessary for installing Laravel, but these are the basic things which you should know about.
  1. .env is the file which contains all the environmental variables. .env is often ignored from being uploaded to GitHub so you can keep your private data's there. But don't worry there is a sample copy of it named .env.example
  2. Routes/web.php is the place where all the routes for your application must be registered.
  3. Resources/views/ is the place where all your .php and .blade.php must be saved.
  4. App/Http/Controllers/ is the place where all your controllers must be saved.
  5. App/ is the place where all your models are to be saved.
  6. Database/migrations/ is the place where all your migrations should be saved.
There are a lot of things which should be told but it will make your head blown at this moment. Now, these are the things which you should do after creating a new project.
  1. Open your .env file and configure the database and any other services like pusher if you want.
  2. Once that's done, make sure you have created the database and run php artisan migrate to migrate.
  3. Run php artisan serve to serve your project locally. Go to localhost:8000 to view your project in action.
Also, don't forget to support my channel by subscribing to it. Click the bell icon for not missing any of my future videos.

Comments

  1. Thanks for sharing the useful information about Installing Laravel 5.5 in Windows 10. Keep sharing more Tutorials like this.

    Custom Web Application Development Company in Coimbatore

    ReplyDelete
  2. Thank you for sharing this informative post. looking forward to read more.
    Laravel Web Development Services

    ReplyDelete

Post a Comment

Popular posts from this blog

RealTime Chat Application using Laravel 5.5

Email verification on Account registration

RealTime Notification system using Laravel 5.5