🎓 A1Learner
🔍
0 of 50 lessons completed

Home / Laravel Beginner

Laravel Beginner

Laravel from a first route to a finished tasks app: controllers, Blade views, requests, validation, migrations, Eloquent, relationships, auth, middleware and tests. Every example verified against real Laravel.

Laravel turns PHP into a working web app with very little setup. A route answers a request, a Blade view shows a page, and Eloquent talks to the database. The course starts with one route and adds a piece at a time until a finished tasks app stands on a server. Fifty short lessons take the reader from a first route to a deployed tasks app.

Start learning ❯❯50 lessons · 12 topics · 0/50 completed

Course contents

Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.

Getting Started

Start: Laravel Introduction ❯

Routing

Start: Laravel Your First Route ❯

Controllers

Start: Laravel Controllers ❯

Blade Views

Start: Laravel Blade Basics ❯

Requests and Responses

Start: Laravel Reading Request Data ❯

Forms and Validation

Start: Laravel HTML Forms ❯

Database and Migrations

Start: Laravel Database Setup ❯

Eloquent Models

Start: Laravel Eloquent Models ❯

Relationships

Start: Laravel One to Many ❯

Middleware and Auth

Start: Laravel Middleware ❯

Testing and Finishing

Start: Laravel Feature Tests ❯

Laravel Capstone: A Tasks App

Beginner · ⏱ 6 min · standalone lesson

Learn Laravel

Laravel gives a PHP project its shape. A route names an address and says what happens there. A controller holds the work for that address. A Blade view turns data into a page. Eloquent moves rows in and out of the database. The course opens with a route that returns one line of text, then adds a new piece in every group.

The database runs inside the app itself. SQLite keeps its tables in a single file, so there is nothing extra to install or start. An Eloquent model stands for one table, and its methods read and write rows. Seeded rows give every database lesson the same starting data.

Fifty lessons sit in twelve groups, with the capstone standing alone at the end. Each lesson ends with a complete example and one question. The printed output beside each example is the output the real run produced — the course shows its working, it does not ask for trust.

What you will learn

The closing lesson pulls the pieces together. It builds a tasks app with routes, Blade views, Eloquent models, validation, and login. The app shows its tasks, saves a new one, and answers a missing title with a clear error.

The course teaches twelve skills, in this order:

  • Install PHP and Composer and start a first Laravel project
  • Answer GET, POST, PUT, PATCH, and DELETE with routes
  • Put the work in controllers, including resource controllers
  • Render pages with Blade layouts and components
  • Pull values out of the address, the body, and headers
  • Send redirects and JSON with the right status code
  • Build forms, guard them with CSRF, and check the input
  • Make tables with migrations and fill them with seeders
  • Store, fetch, change, and remove rows through Eloquent
  • Join tables with one-to-many and many-to-many links
  • Guard routes with middleware, login, and gates
  • Check routes and models with tests, then deploy the app

Who this course is for

Laravel knowledge is not assumed. Basic PHP carries the course: variables, functions, arrays, and classes. Each Laravel idea is defined the first time it appears. Readers who want the PHP first should take the PHP Beginner course.

The full course takes three hours and forty-one minutes. Most readers spend the longest on the database groups, so those repay a second read.

This is a first web app course for PHP readers. It also works for readers who know a different framework and want to see how PHP does the same job.

How this course works

Each example in this course ran for real, on Laravel 13.42.0, PHP 8.3.29, Composer 2.11.2, and SQLite. The output shown on each page is the output that run produced. A task example prints only chosen fields, such as the title and whether it is done, never the id.

A working example and one quick question close each lesson. The order is fixed: routing comes before controllers, because a controller answers what the routes receive. The database comes after requests, because a form sends the data the tables store. Tests close the course, because they check routes that already work.

Frequently asked questions

Do I need to know Laravel first?

No. The course assumes nothing and builds on basic PHP only. Each Laravel idea is defined the first time it appears.

Must I install a database first?

Reading needs nothing installed: every result is shown on the page. Running the examples takes PHP 8.3 and Composer 2.11, as the first group shows. SQLite keeps its tables in one file, so there is no separate database to install.

Which versions do the examples run on?

Laravel 13.42.0, PHP 8.3.29, Composer 2.11.2, and SQLite. Every example ran on those versions, and the output on each page is the output that run gave.

Should I take the PHP course first?

Not for the Laravel ideas. Each idea is defined the first time it appears, and the course points back to the PHP Beginner course, which teaches the language itself. Readers who already write PHP functions and classes can move faster.

What do I build in this course?

A working tasks app: tasks stored in a database, listed on a page, added through a form, checked with validation, guarded by login, and covered by tests. The capstone joins routes, Blade, Eloquent, and auth into one app, and the last lesson puts it on a server.

Next steps

  • PHP ❯ — Learn the language first: variables, functions, arrays, and classes across 40 lessons.
  • Django Beginner ❯ — Build the same kind of app in Python: views, templates, models, and forms across 50 lessons.
  • SQL ❯ — Go deeper on the database: tables, queries, joins, and indexes across 51 lessons.