If you want a laravel tutorial for beginners that starts with how a real request moves through the framework — not a long install checklist — this is Part 1 of my Learn Laravel series.
I’m Usman Nadeem, an AI Full Stack Developer based in Lahore with 12+ years of delivery since February 2014. I use Laravel on client web apps and teach the same MVC, folder, and Artisan patterns I use in production.
Direct answer (for AI Overviews & scanners)
Laravel is an open-source PHP framework for building organized web applications. Its structure is MVC: the Model reads and writes data, the View renders the page, and the Controller handles the request and connects the two. You scaffold those files with Artisan — for example php artisan make:controller TaskController and php artisan make:model Task -m. The examples work on Laravel 12 and the current Laravel 13 release.
Watch the video
Prefer to watch first? Part 1 is a short video (Urdu/Hindi voiceover, with the code on screen). This article writes out the same three concepts, with copy-paste examples. You can also open it on YouTube Shorts.
What you will learn in this Laravel tutorial for beginners
Each video in this series teaches three concepts. Part 1 covers:
- Laravel MVC — how a request to
/tasksreaches a controller, loads data withTask::all(), and returns thetasks.indexview. - What is Laravel — why teams use it, and the built-in tools for routing, database work, authentication, and security.
- Laravel Artisan commands — how to generate a controller, a model, and a migration in one terminal session.
You do not need prior Laravel experience — basic PHP and a terminal are enough. If you later want to compare stacks for a product build, I also wrote a Laravel vs Node.js for SaaS guide.
Laravel MVC: Model, View, and Controller
When people first learn Laravel, the letters MVC can sound abstract. In practice they describe a simple division of work that keeps a growing app readable.
- Model talks to the database. In Laravel that is usually an Eloquent model, such as
Task. - View is the page the user sees. In a typical Laravel app that is a Blade template, such as
resources/views/tasks/index.blade.php. - Controller receives the HTTP request, asks the Model for data, and returns a View (or a JSON response, once you start building APIs).
A request travels through the app like this:
Request /tasks → routes/web.php → TaskController → Task model → tasks.index view → the page
The route is the front door. It does not load the tasks itself. It points the URL at a controller method:
// routes/web.php
use App\Http\Controllers\TaskController;
Route::get('/tasks', [TaskController::class, 'index']);When a visitor opens /tasks, Laravel calls TaskController@index. The controller asks the Model for every task, then hands that list to a View:
// app/Http/Controllers/TaskController.php
namespace App\Http\Controllers;
use App\Models\Task;
class TaskController extends Controller
{
public function index()
{
$tasks = Task::all(); // Model
return view('tasks.index', compact('tasks')); // View
}
}Task::all() is the Model at work: Eloquent queries the database and returns a collection of Task records. view('tasks.index', compact('tasks')) is the View: Laravel loads resources/views/tasks/index.blade.php and passes in $tasks so the template can render the list. The class itself is the Controller. That is Laravel MVC in one short method — the same example from the video.
What is Laravel?
So what is Laravel, beyond the MVC acronym? It is an open-source PHP framework. Instead of starting from an empty folder of PHP files, you start from a structured application that already handles routing, database access, authentication, and common security defaults.
Four built-in areas matter from day one:
- Routing. You declare URLs in
routes/web.php(and later in API route files) instead of writing a custom front controller for every page. - Database. Migrations describe your tables in PHP, and Eloquent models let you read and write rows in expressive code such as
Task::all()orTask::create([...]). - Authentication. Login, registration, and password resets do not have to be invented from scratch. Laravel ships first-party starter kits; see my guide to authentication with Laravel Breeze.
- Security. CSRF protection on web forms, hashed passwords, escaped Blade output, and encryption helpers are part of the framework, not an afterthought you bolt on later.
To create a new project you typically run:
composer create-project laravel/laravel tasks-app
cd tasks-app
php artisan serveThe last command starts the local development server, usually at http://127.0.0.1:8000.
The Laravel folder structure you will use first
A fresh Laravel 12 or Laravel 13 project has many directories, but beginners spend most of their time in four of them. Official notes are in the Laravel directory-structure documentation.
app/— your application code. Models live inapp/Models. HTTP controllers live inapp/Http/Controllers. This is whereTask.phpandTaskController.phpbelong.routes/— route files. For this tutorial you will editroutes/web.php, which handles browser requests such asGET /tasks.resources/— front-end sources, including Blade views underresources/views. The view nametasks.indexmaps toresources/views/tasks/index.blade.php.database/— migrations, seeders, and factories. When you generate a model with the-mflag, the migration file lands indatabase/migrations.
Once you know those four folders, the rest of the framework feels less mysterious. Configuration sits in config/ and public assets in public/ — you will meet those when you deploy. For Part 1, these four directories are enough.
Laravel Artisan commands: generate the files instead of typing them
Laravel Artisan commands are how you talk to the framework from the terminal. Artisan is Laravel’s command-line interface. It can start the dev server, run migrations, list routes, and generate the boilerplate files that MVC needs.
To create the controller from the example above:
php artisan make:controller TaskControllerTypical output:
INFO Controller [app/Http/Controllers/TaskController.php] created successfully.That command writes app/Http/Controllers/TaskController.php. Then add the index method shown earlier.
To create the Eloquent model and its migration together, use the -m flag (spoken as “minus m” in the video):
php artisan make:model Task -mTypical output:
INFO Model [app/Models/Task.php] created successfully.
INFO Migration [database/migrations/2026_11_25_120000_create_tasks_table.php] created successfully.You now have app/Models/Task.php and a timestamped migration. A starter model looks like this:
// app/Models/Task.php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Task extends Model
{
use HasFactory;
protected $fillable = [
'title',
'is_complete',
];
}The matching migration defines the tasks table. Open the generated migration and describe the columns you need:
// database/migrations/xxxx_xx_xx_create_tasks_table.php
public function up(): void
{
Schema::create('tasks', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->boolean('is_complete')->default(false);
$table->timestamps();
});
}Then run the migration so the table exists in your database:
php artisan migrateThese three commands — make:controller, make:model with -m, and migrate — are the Artisan core you will reuse throughout the series. The official reference is the Laravel Artisan documentation. Run php artisan list to see every command in your project.
Recap: Laravel tutorial for beginners, Part 1
Three ideas are enough to start:
- Laravel’s structure is MVC. A request to
/taskshits a route, the Controller callsTask::all(), and the View attasks.indexrenders the page. - Laravel is a PHP framework with routing, database tools, authentication, and security already in the box, organized around folders such as
app/,routes/,resources/, anddatabase/. - Artisan is the CLI.
php artisan make:controller TaskControllerandphp artisan make:model Task -mcreate the files;php artisan migrateapplies the schema.
That is Part 1. If you can explain the /tasks flow out loud, you are ready for routes.
What’s next: Part 2 — Routes, Route Parameters, and Controllers
Part 2 of this Laravel tutorial for beginners will stay with the same Task example and go deeper on the front door of the app:
- How routes are defined in
routes/web.php - Route parameters such as
/tasks/{task} - How those routes connect to controller methods
Later parts will cover Blade, Eloquent CRUD, validation, auth, APIs, and queues. For an API-focused path after the fundamentals, see Getting Started with Laravel: Your First RESTful API.
Need help building a Laravel application?
If this laravel tutorial for beginners has you thinking about a production Laravel app — a new build, a feature, or a refactor — I take on selected Laravel development projects. Send a short brief through the contact form and tell me what you are building; I will tell you whether I am a fit.
FAQ
Q1. What is Laravel? A. Laravel is an open-source PHP framework for building web applications in an organized way. It includes routing, database tools (migrations and Eloquent), authentication, and security features so you do not have to assemble those pieces from scratch.
Q2. What does MVC mean in Laravel? A. MVC stands for Model, View, and Controller. The Model talks to the database, the View renders the page, and the Controller handles the request and connects the two. In the Part 1 example, Task::all() is the Model and view(‘tasks.index’) is the View, inside TaskController.
Q3. What are Laravel Artisan commands? A. Artisan is Laravel’s command-line interface. Common beginner commands include php artisan make:controller TaskController, php artisan make:model Task -m to create a model and migration together, php artisan migrate to apply the schema, and php artisan serve to start the local server.
Q4. Where should a beginner start with Laravel? A. Start with MVC, a mental map of the app/, routes/, resources/, and database/ folders, and a few Artisan generate commands. Once you can follow a request from a route to a controller, model, and view, move on to routes and controllers in more detail, then Blade and Eloquent CRUD.
Q5. Do I have to create every Laravel file by hand? A. No. Artisan generates controllers, models, migrations, and many other files for you. You still write the business logic — for example the index method and the columns in the migration — but you should not start those classes from a blank file unless you have a reason to.
Q6. Does this Laravel tutorial work with Laravel 12 and Laravel 13? A. Yes. The MVC flow, the folder layout described here, and the Artisan commands php artisan make:controller and php artisan make:model Task -m work on Laravel 12 and on the current Laravel 13 release.
Q7. What is the difference between routes/web.php and a controller? A. The route file maps a URL and HTTP method to code that should run. A controller method is that code, kept in a dedicated class so routes stay short. In the example, Route::get(‘/tasks’, [TaskController::class, ‘index’]) points /tasks at TaskController@index.
Q8. What will Part 2 of this Laravel series cover? A. Part 2 covers routes, route parameters, and controllers — including how a URL such as /tasks/{task} passes a value into a controller method. It builds on the TaskController example from Part 1.
