Codementor Events

Laravel tutorial for beginners

Published Aug 10, 2019
Laravel tutorial for beginners

Hello guys,

Indra here, I am using Laravel from last few years in my projects.

In this tutorial, I am going to cover all the basic features of Laravel in a way that you can easily adapt it. I will show you how you can build a simple task list application using all these features.

Prerequisites:

  • Windows 7 or higher (Windows 10 recommended)
  • Wampserver 3 must contain ( PHP >= 7.1.3 )
  • Composer

Roadmap:

We will follow these sequence of learning so that it’s very easy for you to use the most basic features of the Laravel framework.

  1. Installation
  2. Routing
  3. Views
  4. Controllers
  5. Migrations
  6. Model

1.Installation

We are going to create a project via composer create-project command. You can see this process here.

Installation

2. Routing

It’s quite easy to learn Laravel if you start learning from routing. If you go to your project root directory. You will find the routes directory, inside routes directory, there is a web.php file. web.php contains all your web routes. You can see how can we create multiple routes in web.php and how you can access them.

Routing

You can find out more about routing here: https://laravel.com/docs/5.8/routing

3. Views

In the previous section, you have seen that I have put string instead of HTML view. In this section, I will show you how you can create your HTML views. I am going to use Laravel documentation so that later on you can easily follow me.

Views

You can find out more about views here: https://laravel.com/docs/5.8/views

4. Controllers

If you want to make your project more scalable then you can use a controller. In this section, I will show you how to create a controller and link them to your route.

Controllers

You can find out more about controllers here: https://laravel.com/docs/5.8/controllers

5. Migrations

Now it’s time to use a database with our application. Laravel is providing an awesome feature called migrations. Migrations are like version control for database, allowing the team to easily modify and share the application’s database schema. In this video, I will show you how you can use migrations.

Migrations

6. Model

In this section, we will learn how to query a database. Laravel is providing two ways to deal with the database. First one is Query Builder and the second one is Eloquent ORM. In this section, we will use the Query Builder to deal with the database. For beginners, it’s quite easy to understand query builder. We will use the Eloquent ORM when we cover more advanced topics.

Model

You can find out more about query builder here: https://laravel.com/docs/5.8/queries

I hope this tutorial will help you to learn Laravel basics. If you struggling at this then leave it down the comments below.

See you in the next tutorial soon. 😃

Discover and read more posts from Indra Bihola
get started
post commentsBe the first to share your opinion
Show more replies