Laravel Fundamentals
Go from plain PHP to a structured framework — routing, controllers, Blade templates, and talking to a database with Eloquent.
1
units
11
lessons
22
practice questions
~165
minutes
Start learning today
Create a free account, then unlock this and every other Pro course with Learnix Pro for KES 999/month.
Create free account I already have an accountOutcomes
What you'll be able to do
Understand the MVC pattern and why frameworks use it
Define routes and connect them to controllers
Render views with Blade templating
Define an Eloquent model and migration
Perform basic CRUD through Eloquent
How it works
Read it, see it, practise it
Each lesson explains one topic clearly, shows worked examples, checks your understanding with quick questions and ends with a practical task you complete yourself.
Clear explanations
Step-by-step lessons in plain language
29 in this course
Worked examples
Real code and examples you can copy and run
49 in this course
Quick checks
Test your understanding as you go
11 in this course
Fill the blank
Recall the key commands and syntax
11 in this course
Hands-on workspace
A practical task at the end of every lesson
11 in this course
Syllabus
Everything you'll encounter
What is Laravel, and why use a framework?
Laravel gives a PHP application a well-tested structure to follow (MVC), so you spend your time on YOUR app's actual logic instead of reinventing routing, security and database plumbing from scratch every time.
Routing Basics
A route is simply a rule that says "when a visitor asks for this URL, run this code" — it's the very first stop every single request makes inside Laravel.
Controllers
Once a route needs to do anything more than return a one-liner, that logic moves out of routes/web.php and into its own Controller class — a dedicated, organized home for it.
Blade Templating
Blade is Laravel's templating engine — it looks and behaves like ordinary HTML, with a small, friendly set of extra syntax bolted on for displaying data and handling loops and conditions.
Eloquent Models & Migrations
A migration writes down a database table's structure as version-controlled PHP code, and an Eloquent model then gives you a clean, object-oriented way to actually query that table.
Basic CRUD with Eloquent
Create, Read, Update, Delete — the four operations practically every application performs on its data, and with Eloquent each one usually takes just one or two lines of PHP.
Middleware: Filtering Requests Before They Reach a Controller
Middleware sits between an incoming request and your controller, like a security checkpoint — it can inspect, block, or modify a request before it's allowed to continue, or do the same to the response on its way back out.
Form Requests: Clean, Reusable Validation
Validating input directly inside a controller method works, but it clutters the method fast — a Form Request class moves all of that validation logic into its own dedicated, reusable place.
Handling File Uploads
Letting a visitor upload a file — a profile photo, a document — needs a form that says so explicitly, validation that checks what actually arrived, and a deliberate decision about where the file ends up being stored.
API Resources: Returning JSON from a Controller
Not every response needs to be an HTML page — an API Resource shapes an Eloquent model (or a whole collection of them) into exactly the JSON structure you want to hand back to a mobile app, a JavaScript frontend, or any other API consumer.
Eloquent Relationships: hasMany, belongsTo, and Many-to-Many
Real data is connected — a course has many lessons, a lesson belongs to one course, and a student can enroll in many courses while each course has many students. Eloquent relationships describe these connections directly on your models, so you can traverse them like ordinary properties.
Finish the course, earn a verifiable certificate
Complete every lesson to receive a Learnix certificate with a unique number anyone can verify online.