Easy step-by-step tutorial on how to create a website using the Laravel Framework - Part 2

Easy step-by-step tutorial on how to create a website using the Laravel Framework - Part 2

Welcome back! Hope you've finished reading the PART 1 of this post. Now, let's continue.

Laravel framework downloading, installation, and setup

After installing the composer package you can now create a new laravel project. Turn on your WAMP server and navigate to your WAMP's www folder. In my case it's C:\wamp64\www and from here you can press 'Shift + right click' and select the 'Open command window here' to open your terminal exactly at the location of your WAMP's www folder. See the image below:

Command

Then type this command to your terminal: composer create-project --prefer-dist laravel/laravel blog "5.8.*" and press Enter.

where 'blog' is your project name. You can change it with anything you like before pressing the Enter key. In this project I used the Laravel version 5.8. You can also use other version of the framework by just changing the version number before pressing the Enter key.

Next, type cd blog (or whatever name you named your project) into your terminal then press Enter. Then type php artisan key:generate and Enter to generate a unique key for your project.

Before going any further, let's setup this project into your favorite code editor. I'm using sublime text 2 editor but feel free to use any editor you want. I'm sure there are lots of free software out there available for you to use. You may want to use Visual Studio Code, Notepad++, a list goes on. After installing the editor add your whole project (blog) into your editor's project explorer on the left. See the image below:

Sublime

Next, navigate to your project in the project explorer and you can see the file .env.example. Rename it to just .env and open it. See the image below:

ENV

Now it's time to configure the database connection. I've highlighted above the variables needed to be configured correctly in order to connect to the database successfully. Before filling that up, go to your browser and navigate to http://localhost/phpmyadmin in order to get into the database interface. Then create a database there (any names you like).

Comments

  • Avatar
    Consider buying a hygrometer to measure the level of humidity in your house to keep off common allergens.
  • Avatar
    BioJolt Review May 22, 2020
    I simply couldn't leave your website before suggesting that I really enjoyed the usual info a person supply for your guests? Is going to be back often in order to inspect new posts
  • Avatar
    Simply a smiling visitor here to share the love (:, btw outstanding design and style.

Leave a Comment

Make sure you enter the required information where indicated. HTML code is not allowed.