Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Building Web Apps with Laravel  Module 1 – Start here: Laravel 13 in 2026

What Laravel is and when to use it

What Laravel 13 adds to plain PHP, which release still gets fixes and on which PHP, and when Symfony, a micro-framework or plain PHP fits better.

  • Beginner
  • 15 minutes
  • Examples run with PHP 8.5.11, Composer 2.10.3, Laravel 13.34.0 and Python 3.14.8
  • By MySmartCoPilot
Free lesson, Pro answers: 15 minutes
Free: the whole lesson. With a pass: the model answers to its 2 interview questions.

What you will learn

  • Explain what Laravel adds on top of plain PHP, from routing, Blade and Eloquent to validation, logins, queues, tests and Artisan
  • Choose a Laravel release that still receives fixes, and name the PHP versions it needs
  • Decide when an app is better served by Laravel, Symfony, a micro-framework or plain PHP
  • Separate the MIT-licensed framework and packages from the commercial services sold beside them
What you’ll learn

What you will learn

  • Explain what Laravel adds on top of plain PHP, from routing, Blade and Eloquent to validation, logins, queues, tests and Artisan
  • Choose a Laravel release that still receives fixes, and name the PHP versions it needs
  • Decide when an app is better served by Laravel, Symfony, a micro-framework or plain PHP
  • Separate the MIT-licensed framework and packages from the commercial services sold beside them
On this page

Laravel is a PHP framework for web applications, and a new Laravel 13 project shows its size at once: it installs 109 Composer: PHP's dependency manager. It reads composer.json, downloads the packages a project needs from Packagist and installs them into the vendor folder. More in “Install PHP, Composer and Laravel 13” packages and offers 122 Artisan: Laravel's command-line tool, run as php artisan inside the project folder. Its commands create files (make:model), show what the app sees (route:list, about) and manage caches (config:cache). More in “Project structure, configuration and Artisan” commands before you have written a line of your own. Those packages answer the questions every PHP web app meets, from how a URL reaches your code to how a form is checked, who is logged in and what runs later.

Here you look inside a new project to see what Laravel adds to the PHP you know, pick a release from the official support table, compare Laravel with Symfony, a micro-framework and plain PHP, and separate the open-source framework from the commercial services sold beside it. Through the whole track you build Pathshala, a fictional manager for a coaching centre, with its batches, students, fees and notices; every person and record in it is invented.

Laravel answers the questions every web app asks

Pathshala’s first page, built in the next module, is a notice board: a guardian opens /notices and reads the centre’s notices. In plain PHP, as the php track builds pages with include and require, that one page already needs your own code for four jobs: matching the address to a script, reading the notices from the database, printing them so that no title can run as a script, and checking who may post a new one. Every web app repeats those jobs. A web framework: A set of libraries and conventions that does the work every web app repeats, such as sending each URL to the right code, writing pages, reading the database and checking input, so that you write only the part that is your own app. takes them over, so that the code you write is the part only your app has.

These are the jobs Laravel takes over, and the part of it that does each one:

The job What Laravel gives you
Send each URL to the code that answers it The router, and middleware that checks requests on the way
Write HTML pages safely Blade templates, whose double braces escape every value
Read and write the database Eloquent models for the rows, migrations for the tables
Check what users send Validation rules and form requests
Know who is logged in, and what they may do Authentication, plus gates and policies
Do slow work later, or on a timetable Queues, events and the scheduler
Prove that the app still works Test helpers that send fake requests, on PHPUnit or Pest
Create files and run tasks Artisan, the command-line tool in every project

The parts work together in a fixed order on every request. A request first passes through middleware: A class that sits between the web server and the controller. It can inspect or change a request, stop it with its own response, or pass it inward and then change the response on the way out. More in “How Laravel handles a request”, then the router calls your code, an Eloquent model: A PHP class that stands for one database table, each of its objects for one row: the Notice model queries the notices table, and saving a Notice object writes its row. More in “Your first CRUD feature with Eloquent” model reads the rows and a Blade: Laravel's templating language: an HTML file in resources/views with directives such as @foreach and the {{ }} echo tags, compiled to plain PHP. More in “Your first page: route, controller and view” view writes the page. Step through one guardian’s visit to the notice board, from the file every request enters by to the page that comes back, and watch where each row of the table takes its turn:

Interactive · stage by stage One request for the notice board, through a Laravel app Step through a guardian's visit to /notices, from the file every request enters by to the page that comes back.
One request for the notice board, through a Laravel app, step 9 of 9. Showing public/index.php, HTTP kernel (session, CSRF, maintenance), Router (GET /notices matched), NoticeController, Eloquent model (one SELECT, Notice objects), Blade view, Response. In focus: Response.refused by middlewarepublic/index.phpthe one entry pointHTTP kernelsession, CSRF, maintenanceRouterGET /notices matchedNoticeControllerits index() methodEloquent modelone SELECT, Notice objectsBlade viewnotices/index.blade.phpResponseHTML for the browser

The drawing shows the whole scene; its 9 steps are listed below.

Every step as text
  1. A request arrives. A guardian opens Pathshala's notice board, and the browser sends GET /notices. The web server passes it to public/index.php, the entry point of every Laravel app, which loads Composer's autoloader and creates the application.
  2. The kernel boots the app. The HTTP kernel takes the request. It first runs the bootstrappers and the service providers, which set up error handling, logging, the database, validation and routing for this request.
  3. Middleware on the way in. Before any of the app's own code runs, the request passes through middleware: the session is read, the maintenance check runs, and a form sent with POST has its CSRF token checked.
  4. Middleware can refuse. Middleware may answer on its own. If this page needed a logged-in user and the visitor had none, the authentication middleware would send a redirect to the login page, and no controller would run.
  5. The router finds the route. The request is let through, so the router compares GET /notices with the routes in routes/web.php. One of them names NoticeController's index method, and the router calls it.
  6. The controller decides. The controller holds this page's own logic: index() asks the model for the notices and hands them to a view. It writes no SQL and no HTML of its own.
  7. Eloquent reads the table. Eloquent turns the request for every notice into one SELECT on the notices table, and each row comes back as a Notice object with a title and a body. This is the model in model-view-controller.
  8. Blade writes the HTML. The view notices/index.blade.php turns the notices into HTML. Blade escapes every value printed between double braces, so a title that holds a script tag shows up on the page as text instead of running.
  9. The page goes back. The HTML becomes a response with status 200. It travels back out through the middleware, which may add cookies and headers, and the kernel sends it to the browser.

The split you just followed is model-view-controller (MVC): A way to split an app's code into models, which hold the data and its rules, views, which turn data into what the user sees, and controllers, which take a request and join the two.: the Notice model holds the data, the Blade view holds the HTML, and NoticeController joins the two for one request, while the router and the middleware decide whether that code runs at all. Laravel’s documentation describes two ways to use all this: as a full-stack framework that also renders the pages, which is how this track starts, or as the API backend of a JavaScript or mobile front end. Either way, every part has a fixed place in the project and a command that starts it. A new project lists those commands:

Artisan in a new Laravel 13 project Python · what_it_adds_session.py
# In a new Laravel 13 project: how many Artisan commands it has, and the make: commands that write an app's parts.
from session import run

run("""
php artisan list --raw | wc -l
php artisan list make --raw
""", app=True)

Output

$ php artisan list --raw | wc -l
     122
$ php artisan list make --raw
make:cache-table           Create a migration for the cache database table
make:cast                  Create a new custom Eloquent cast class
make:channel               Create a new channel class
make:class                 Create a new class
make:command               Create a new Artisan command
make:component             Create a new view component class
make:config                Create a new configuration file
make:controller            Create a new controller class
make:enum                  Create a new enum
make:event                 Create a new event class
make:exception             Create a new custom exception class
make:factory               Create a new model factory
make:interface             Create a new interface
make:job                   Create a new job class
make:job-middleware        Create a new job middleware class
make:listener              Create a new event listener class
make:mail                  Create a new email class
make:middleware            Create a new HTTP middleware class
make:migration             Create a new migration file
make:model                 Create a new Eloquent model class
make:notification          Create a new notification class
make:notifications-table   Create a migration for the notifications table
make:observer              Create a new observer class
make:policy                Create a new policy class
make:provider              Create a new service provider class
make:queue-batches-table   Create a migration for the batches database table
make:queue-failed-table    Create a migration for the failed queue jobs database table
make:queue-table           Create a migration for the queue jobs database table
make:request               Create a new form request class
make:resource              Create a new resource
make:rule                  Create a new validation rule
make:scope                 Create a new scope class
make:seeder                Create a new seeder class
make:session-table         Create a migration for the session database table
make:test                  Create a new test class
make:trait                 Create a new trait
make:view                  Create a new view

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 what_it_adds_session.py

Artisan has 122 commands, and 37 of them start with make:, one for each kind of class an app is made of: make:controller, make:model and make:migration for the notice board, make:request for the rules of a form, make:job for slow work and make:test for a test, among others. Each one writes its file where the framework expects it, so the next developer, or you in six months, finds it where every other Laravel project keeps it.

Key idea

Laravel takes over the jobs every web app repeats, from routing and safe HTML to the database, validation, logins, background work, tests and code generation, and gives each a fixed place, so your own code is the part only your app has.

Checkpoint

Check: What Laravel adds to plain PHP

  1. Question 1 of 2 A notice in the database has the title <b>Exams</b>. The Blade view prints it with {{ $notice->title }}. What does the guardian see?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: The text <b>Exams</b>, tags and all

    The step of the request flow where Blade writes the HTML is the one that protects the page: every value printed with double braces goes through PHP's htmlspecialchars, so a title holding a tag, or a script, shows up as text.

  2. Question 2 of 2 Pathshala's form for a new notice must refuse an empty title before the controller stores anything. Which of the make: commands in the session writes the class for those checks?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: make:request, which writes a form request class

    The session listed 37 make: commands, one for each kind of class an app is made of. make:request writes a form request: the validation rules for one form, which run before the controller's own code.

Pick a major that still gets fixes, and the PHP it needs

Every recorded run in this track names its versions. The next session asks a new project for them, then shows the versions its composer.json allows:

Which Laravel and PHP a project runs, and what it allows Python · versions_session.py
# The Laravel and PHP versions a project runs, and the versions its composer.json allows.
from session import run

run("""
php artisan --version
php -r "echo PHP_VERSION, PHP_EOL;"
grep -E '"(php|laravel/framework)":' composer.json
""", app=True)

Output

$ php artisan --version
Laravel Framework 13.34.0
$ php -r "echo PHP_VERSION, PHP_EOL;"
8.5.11
$ grep -E '"(php|laravel/framework)":' composer.json
        "php": "^8.3",
        "laravel/framework": "^13.17",

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 versions_session.py

13.34.0 reads as major 13, minor 34, patch 0. Laravel and its packages follow semantic versioning: A way of numbering releases as major.minor.patch: a new major version may break code written for the one before, a new minor adds features without breaking anything, and a patch only fixes bugs.: a major release, which Laravel ships once a year around the first quarter, may break code, while minor and patch releases, which may come as often as every week, should never break it. Packagist shows that pace in practice, since the framework went from 13.0.0 to 13.34.0 in 28 weeks. That is why the project asks for "laravel/framework": "^13.17": Composer reads a caret constraint as every release from 13.17.0 up to, but not including, 14.0.0, and the release notes tell projects to write such a constraint, as in ^13.0. The line "php": "^8.3" works the same way for PHP itself: 8.3 or any newer 8.x.

A major does not stay supported for long. The support policy gives every Laravel release 18 months of bug fixes and 2 years of security fixes, counted from its release, and its table also names the PHP versions each major runs on. Walk through the majors a project may meet:

Timeline · 5 events in order Laravel's majors, their PHP versions and how long each gets fixes Walk through the majors from the oldest a project may still run to the next one expected.
  1. Laravel 10

    No fixes of any kind end of life

    Released in 2023 for PHP 8.1 to 8.3. Its bug fixes ended in 2024 and its security fixes early in 2025, so a project on Laravel 10 receives nothing from the framework now.

  2. Laravel 11

    No fixes since the first quarter of 2026 end of life

    Released in 2024 for PHP 8.2 to 8.4. Bug fixes ran for 18 months, into the third quarter of 2025, and security fixes ended two years to the day after its release.

  3. Laravel 12

    Security fixes only, until early 2027 security only

    Released in 2025 for PHP 8.2 to 8.5. Its bug fixes ended in the third quarter of 2026, and security fixes continue until two years after its release, in the first quarter of 2027.

  4. Laravel 13

    Bug fixes and security fixes current

    Released in the first quarter of 2026 for PHP 8.3 to 8.5. Bug fixes continue until Q3 2027 and security fixes until two years after its release, in the first quarter of 2028. This track runs Laravel 13.34.0 on PHP 8.5.11.

  5. Laravel 14 (expected)

    The next major, expected around the first quarter of 2027 expected

    Laravel ships one major a year, around the first quarter, so Laravel 14 is expected early in 2027. That is an estimate from the stated cadence; its PHP versions and support dates join the table when laravel.com publishes them.

The timeline has 5 events, from Laravel 10 to Laravel 14 (expected).

The same table fits in a small program. laravel_support.php holds its four rows and a function that says where a major stands on a given day. The table gives the end of Laravel 13’s bug fixes as a quarter, not a day, so the function says that rather than guess, and a major the table does not hold yet, such as 14, is reported as unknown:

laravel_support.php: the official support table PHP · laravel_support.php
<?php

// Laravel's support table, from laravel.com/framework/docs/13.x/releases: the PHP versions each major release
// supports, the day it came out, and the last day of bug fixes and of security fixes. The table gives Laravel 13's
// end of bug fixes as a quarter, not a day, so that entry holds the quarter. Dates are written as YYYY-MM-DD,
// which compare correctly as plain strings.
const LARAVEL = [
    10 => ['php' => '8.1-8.3', 'released' => '2023-02-14', 'bugs' => '2024-08-06', 'security' => '2025-02-04'],
    11 => ['php' => '8.2-8.4', 'released' => '2024-03-12', 'bugs' => '2025-09-03', 'security' => '2026-03-12'],
    12 => ['php' => '8.2-8.5', 'released' => '2025-02-24', 'bugs' => '2026-08-13', 'security' => '2027-02-24'],
    13 => ['php' => '8.3-8.5', 'released' => '2026-03-17', 'bugs' => 'Q3 2027', 'security' => '2028-03-17'],
];

// The first and the last day of a quarter such as "Q3 2027".
function quarterDays(string $quarter): array
{
    [$q, $year] = sscanf($quarter, 'Q%d %d');
    $first = ['01-01', '04-01', '07-01', '10-01'][$q - 1];
    $last = ['03-31', '06-30', '09-30', '12-31'][$q - 1];

    return ["$year-$first", "$year-$last"];
}

function supportStatus(int $major, string $day): string
{
    $row = LARAVEL[$major] ?? null;
    if ($row === null) {
        // Older than the table: long out of support. Newer: not published yet, so the program does not guess.
        return $major < min(array_keys(LARAVEL)) ? 'end of life' : 'not in the table yet';
    }
    if ($day < $row['released']) {
        return 'not released yet';
    }
    if (str_starts_with($row['bugs'], 'Q')) {
        [$first, $last] = quarterDays($row['bugs']);
        if ($day < $first) {
            return 'bug fixes and security fixes';
        }
        if ($day <= $last) {
            return "bug fixes end during {$row['bugs']}";
        }
    } elseif ($day <= $row['bugs']) {
        return 'bug fixes and security fixes';
    }

    return $day <= $row['security'] ? 'security fixes only' : 'end of life';
}
Where each major stands on three days PHP · support_window.php
<?php

require __DIR__ . '/laravel_support.php';

// Three days: the last day of Laravel 11's security fixes, the day after Laravel 12's bug fixes ended, and a day
// inside the quarter in which Laravel 13's bug fixes end.
foreach (['2026-03-12', '2026-08-14', '2027-08-02'] as $day) {
    echo "On $day:\n";
    foreach ([10, 11, 12, 13, 14] as $major) {
        $php = LARAVEL[$major]['php'] ?? '?';
        printf("  Laravel %d  PHP %-7s  %s\n", $major, $php, supportStatus($major, $day));
    }
}

Output

On 2026-03-12:
  Laravel 10  PHP 8.1-8.3  end of life
  Laravel 11  PHP 8.2-8.4  security fixes only
  Laravel 12  PHP 8.2-8.5  bug fixes and security fixes
  Laravel 13  PHP 8.3-8.5  not released yet
  Laravel 14  PHP ?        not in the table yet
On 2026-08-14:
  Laravel 10  PHP 8.1-8.3  end of life
  Laravel 11  PHP 8.2-8.4  end of life
  Laravel 12  PHP 8.2-8.5  security fixes only
  Laravel 13  PHP 8.3-8.5  bug fixes and security fixes
  Laravel 14  PHP ?        not in the table yet
On 2027-08-02:
  Laravel 10  PHP 8.1-8.3  end of life
  Laravel 11  PHP 8.2-8.4  end of life
  Laravel 12  PHP 8.2-8.5  end of life
  Laravel 13  PHP 8.3-8.5  bug fixes end during Q3 2027
  Laravel 14  PHP ?        not in the table yet

Recorded with PHP 8.5.11 (cli) (NTS) on macOS 26 arm64. To run it yourself: php support_window.php

The first day is the last of Laravel 11’s security fixes, when 13 was not out yet. By the second, 11 had reached its end of life and 12 had moved to security fixes only, and by the third, inside the quarter in which 13’s bug fixes end, 12 was out of support as well. Because a major arrives about once a year and keeps security fixes for two, two majors are in support most of the time, and a project still on a major more than two years after its release runs without security fixes.

PHP has support windows of its own, which the php track’s first lesson works through. PHP 8.3, the oldest that Laravel 13 accepts, receives security fixes until the end of 2027, a few months before Laravel 13’s own end in 2028, while PHP 8.5 keeps them until the end of 2029. So a new Laravel 13 project is best started on PHP 8.4 or 8.5.

Starting on the versions a tutorial used

A tutorial shows the versions of the day it was written, and one that installs Laravel 11 on PHP 8.2 now starts a project with no fixes at all. Start from the support table instead: the newest major that still gets bug fixes, then a PHP version inside its range, such as Laravel 13 on PHP 8.4 or 8.5.

Checkpoint

Check: Releases, support windows and PHP versions

  1. Question 1 of 2 A server you must use runs PHP 8.2 and cannot be changed this year. Which Laravel major can you install there that still receives security fixes?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Laravel 12, which supports PHP 8.2 to 8.5 and gets security fixes until the first quarter of 2027

    Read the PHP column first and the support columns second: 11 and 12 run on 8.2, and of those only 12 still gets security fixes. Moving the server to PHP 8.3 opens Laravel 13, with bug fixes until Q3 2027.

  2. Question 2 of 2 The session showed "laravel/framework": "^13.17" in composer.json. Which of these versions may composer update install?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: 13.37.0

    Composer reads ^13.17 as at least 13.17.0 and below 14.0.0. With semantic versioning, every minor and patch release in that range keeps the code working, so composer update may take them; the next major waits for a deliberate upgrade.

Laravel, Symfony, a micro-framework or plain PHP: choose by the app

Laravel is not the only foundation for a PHP web app, and it is less separate from the others than it may look. This session counts the Symfony packages inside the new Laravel project:

Symfony packages inside a Laravel project Python · symfony_inside_session.py
# The Symfony packages a new Laravel project installs: how many, and which ones are components rather than
# polyfills or contracts. One composer call writes the names to a file, then wc and grep read it back.
from session import run

run("""
composer show --name-only 'symfony/*' > symfony-packages
wc -l < symfony-packages
grep -v -e polyfill -e contracts symfony-packages
""", app=True)

Output

$ composer show --name-only 'symfony/*' > symfony-packages
$ wc -l < symfony-packages
      31
$ grep -v -e polyfill -e contracts symfony-packages
symfony/clock
symfony/console
symfony/css-selector
symfony/error-handler
symfony/event-dispatcher
symfony/finder
symfony/http-foundation
symfony/http-kernel
symfony/mailer
symfony/mime
symfony/process
symfony/routing
symfony/string
symfony/translation
symfony/uid
symfony/var-dumper

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 symfony_inside_session.py

31 of the 109 packages are Symfony’s, and once the polyfills and the contracts are left out, 16 components remain. Laravel’s own source shows how deep they go: its request and response classes extend those of http-foundation, Artisan is built on console, the router uses routing, and mail goes out through mailer. So the choice between foundations is less about whose code runs and more about how much is decided for you. Four are common:

  • Laravel is a full-stack framework with one default for each job in the table above, wired together and started by Artisan. You pay for that in size and pace: 109 packages before the first route, and a major upgrade at least every two years to keep security fixes.
  • Symfony describes itself as “a set of PHP Packages, a Web Application framework, a Philosophy, and a Community”. Its plain skeleton starts small, for a microservice, a console tool or an API, or you install the packages of a traditional web app in one go. A new minor comes every six months, and the last minor of each major line is a Long-term support: a release that receives fixes for longer than the others of its line, so that an app can stay on it for years. release, with 3 years of bug fixes and 4 of security fixes.
  • A micro-framework such as Slim is, in Slim’s own words, “a dispatcher that receives an HTTP request, invokes an appropriate callback routine, and returns an HTTP response”. You add the database layer, templates, validation and logins yourself, which keeps a few endpoints small and leaves a large app to you.
  • Plain PHP is what the php track writes: nothing to install, and every step of a request in view. You also write and keep secure the routing, the escaping, the Cross-site request forgery: another site makes a visitor's browser send a request, such as a form, to your app without the visitor meaning to. Apps refuse it by checking a secret token that only their own pages carry. checks and the logins, a good way to learn and a slow way to build a product.

Which one fits depends on the app and on the team that will keep it running. Pick an app, real or planned, and answer the two questions for it. Each answer rules options out or adds a caveat, and every verdict says why:

Interactive · answer and compare Which foundation fits the PHP app you have in mind? Choose an answer to each question about your app. Options that do not fit are ruled out, or keep a caveat, with the reason beside them.
What are you building?
How often can the team take on an upgrade to a new major release of the framework?

Answer the questions above: the table then marks what fits your case and says why the rest does not.

Laravel, Symfony, a micro-framework and plain PHP against four things a PHP web app asks of its foundation
Foundation A database app with users Parts you choose and wire Fixes for one release A few endpoints
Laravel What you start with: a full-stack framework with one default for each job Good routing, Eloquent, validation, logins, queues and tests work together Good few: 37 make: commands generate the usual parts Mixed a major a year, with 18 months of bug fixes and 2 years of security fixes Mixed 109 packages in a new project, before your first route
Symfony What you start with: reusable components, and a framework built from them Good its webapp option installs the packages a traditional web app needs Mixed the skeleton grows by the packages you require Good LTS releases get 3 years of bug fixes and 4 of security fixes Good the plain skeleton is made for a microservice or an API
A micro-framework What you start with: a router and middleware, such as Slim Poor you add and wire a database layer, templates, validation and logins Poor most: a PSR-7 implementation, a container and every library above Mixed fixes come as Slim 4 point releases; follow its security advisories Good a dispatcher: the request in, one callback, the response out
Plain PHP What you start with: PHP itself, plus the libraries you pick Poor you write the routing, escaping, CSRF checks and sessions yourself Poor every library and every convention is yours to pick Mixed PHP's own releases, and your own code to patch Good nothing to install beyond PHP itself
How the answers decide
  • “What are you building?” An app with a database, logins and forms: rules out A micro-framework and Plain PHP. An app with users needs routing, a database layer, validation, logins and background jobs, and these two leave every one of them to you.
  • “What are you building?” A small API, a few endpoints: adds a caveat to Laravel. Laravel serves APIs well, but a new project installs 109 packages; for a few endpoints a micro-framework or the plain Symfony skeleton stays smaller.
  • “What are you building?” A page or two, to learn how PHP serves the web: adds a caveat to Laravel and Symfony. A framework does for you the request handling you want to see. Plain PHP shows every step, and a framework makes more sense once you have done them by hand.
  • “How often can the team take on an upgrade to a new major release of the framework?” Rarely, every three years or more: adds a caveat to Laravel. Each Laravel major gets security fixes for 2 years, so the app needs a major upgrade at least that often; a Symfony LTS release gets 4 years.

In short, an app with users, forms, a database and background work wants Laravel or Symfony: Laravel when the team welcomes one default per job and can upgrade every year or two, Symfony when the app should stay on one release line for years. A micro-framework or plain PHP suits a handful of endpoints, and plain PHP is the way to see how the web works underneath. Pathshala has users, fee records, forms and morning reminders, which is why this track builds it with Laravel.

Key idea

Laravel and Symfony share components, so choose between them by how much you want decided for you and how often you can upgrade, and keep a micro-framework or plain PHP for small apps and for learning.

Checkpoint

Check: Laravel, Symfony, a micro-framework or plain PHP

  1. Question 1 of 2 What did the session of Symfony packages show about Laravel and Symfony?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Laravel is built on Symfony components, such as HTTP foundation, routing, console and mailer

    Of the 109 packages, 31 are Symfony's; leave out the polyfills and contracts and 16 components remain, such as http-foundation, routing, console and mailer. Choosing between the two frameworks is choosing how much is decided for you, not whose code runs underneath.

  2. Question 2 of 2 A shop needs one endpoint that receives a payment notice from its provider and stores one row. Nothing else will be added. Which foundations does the lesson's table mark as the best fit?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: A micro-framework such as Slim, the plain Symfony skeleton, or plain PHP

    The table's few-endpoints criterion favours the options that start with least: a micro-framework is a dispatcher, the plain Symfony skeleton is made for microservices and APIs, and plain PHP installs nothing.

The framework is open source, and the services around it are separate products

A new project is made of other people’s code, so it pays to know what the project asks for and what Composer installed in all:

What a new project installs Python · licences_session.py
# What the project asks for and what Composer installed in all. Two composer calls read the lock file and name the
# direct dependencies, then count every package the install pulled in.
from session import run

run("""
composer show --direct --name-only
composer show --name-only | wc -l
""", app=True)

Output

$ composer show --direct --name-only
fakerphp/faker
laravel/framework
laravel/pail
laravel/pao
laravel/pint
laravel/tinker
mockery/mockery
nunomaduro/collision
phpunit/phpunit
$ composer show --name-only | wc -l
     109

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 licences_session.py

The project asks for 9 packages directly, 2 to run the app and 7 for development, and Composer installed 109 in all. A production build drops the development tools, and the licence summary names the terms under which that code arrives:

The production count and the licence summary Python · licences_summary_session.py
# The production-only count and the licence summary. Composer prints how many packages a deploy carries without the
# development tools, then its licence summary of everything installed.
from session import run

run("""
composer show --name-only --no-dev | wc -l
composer licenses --format=summary
""", app=True)

Output

$ composer show --name-only --no-dev | wc -l
      76
$ composer licenses --format=summary
 -------------- ------------------------
  License        Number of dependencies
 -------------- ------------------------
  MIT            77
  BSD-3-Clause   31
  GPL-2.0-only   2
  GPL-3.0-only   2
  Apache-2.0     1
 -------------- ------------------------

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 licences_summary_session.py

Without the development tools, 76 packages are left to deploy. The summary counted 113 licences for those 109 packages, because nette/schema and nette/utils list three licences each, and Composer’s schema says that a list means a choice between them: both can be used under BSD-3-Clause. The rest are under the MIT, BSD-3-Clause or Apache-2.0 licence. The framework’s own LICENSE file is the MIT licence, which lets you use, copy, change and sell what you build, as long as the copyright and licence notice stay with the copies.

The same goes for Laravel’s first-party package: A package made and maintained by the same team as the framework it extends, such as Laravel's Sanctum or Horizon, which an app installs with Composer only when it needs it., which its team keeps beside the framework and an app adds with Composer when it needs one: Sanctum for API tokens, Fortify and Socialite for logins, Passport for an OAuth2 server, Horizon for a queue dashboard, Reverb for WebSockets, Octane for keeping the booted app in memory, Pulse and Telescope for watching an app, Scout for search, Cashier for subscription billing, Pennant for feature flags, Pint for code style, Sail for containers and Tinker for an interactive shell. Packagist lists every one of them under the MIT licence.

The company behind Laravel also sells products of its own, and these are what cost money. None of them is needed to build, run or deploy a Laravel app, and nothing in this track uses one:

Product What it is How it is sold
Laravel Cloud A managed platform that runs and scales Laravel apps Monthly plans plus usage
Forge A service that sets up and manages servers you rent Monthly or yearly plans
Vapor A serverless deployment platform Takes no new customers
Nightwatch Monitoring of an app’s requests, jobs and queries A starting tier at no cost, then paid tiers
Nova An admin panel, installed with Composer A commercial licence, bought once
Herd A desktop app with PHP and a web server, for macOS and Windows A basic version at no cost, and a paid tier

Nova is the one that differs from the rest. It arrives through composer require like any package, but under a commercial licence that is bought, so it belongs on the list of what a project costs. The others are services outside your code: a Laravel app runs on a server of your own that has PHP 8.3 or newer, the PHP extensions the framework needs and a web server, which is where the deployment guide starts.

MySmartCoPilot and Laravel

MySmartCoPilot is not affiliated with Laravel or with the company that makes it and sells the products above. The names are used only to say what each product is.

Checkpoint

Check: Open-source code and commercial services

  1. Question 1 of 2 composer licenses listed GPL-2.0-only and GPL-3.0-only, two packages each. Does the new project hold code you may use only under the GPL?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: No: nette/schema and nette/utils offer a choice of BSD-3-Clause, GPL-2.0 or GPL-3.0

    The summary counted 113 licences for 109 packages, because two packages list three each. Composer's schema says a list means a choice between licences, so the two nette packages can be used under BSD-3-Clause.

  2. Question 2 of 2 Which of these needs a purchased licence before it runs inside your own app?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Nova, the admin panel

    The framework and its first-party packages are MIT-licensed. The products Laravel charges for are services an app may use, such as Cloud, Forge or Nightwatch, and Nova, which is code under its own commercial licence.

Practise: versions, foundations and licences

Three things to try on your own computer once the next lesson has installed PHP and Composer:

  1. Copy laravel_support.php and support_window.php, add a fourth day to the list, the day after Laravel 13’s security fixes end, and write down every line you expect before you run php support_window.php.
  2. In a Laravel project of your own, run composer show --direct and composer licenses --format=summary, then explain every licence the summary lists and which package brought it.
  3. Take an app you know, such as a club’s sign-up form or a shop’s order page, answer the two questions of the table above for it, and write one sentence that defends the foundation it leaves you with.

Then test yourself here; each answer comes with the reason it is right, or with what it misses:

Practice that adapts to you

Practise this lesson

12 questions about 4 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.

  1. Question 1 of 12 In the model-view-controller split of the notice board, which part turns the notices into HTML?

    Choose one answer.

    Show the answer: Question 1 of 12

    Answer: The view, notices/index.blade.php

    Model, view, controller: the Notice model holds the data, the Blade view the HTML, and NoticeController the logic that joins them for one request.

  2. Question 2 of 12 A visitor who is not logged in asks for a page whose route needs a logged-in user. Where does Laravel answer them?

    Choose one answer.

    Show the answer: Question 2 of 12

    Answer: In the authentication middleware, with a redirect to the login page, before any controller runs

    The lifecycle runs the request through middleware before the router calls a controller. The authentication middleware redirects a visitor without a login, so none of the page's own code runs for them.

  3. Question 3 of 12 Which of these jobs does a new Laravel project leave entirely to you?

    Choose one answer.

    Show the answer: Question 3 of 12

    Answer: Deciding what the notice board shows, and who may post on it

    A framework answers the jobs every app repeats: routing, escaping, request checks, the database and tests. What is left is what makes the app yours, its data, its pages and its rules.

  4. Question 4 of 12 For how many months does each Laravel major release receive bug fixes?

    Type a number.

    Show the answer: Question 4 of 12

    Answer: 18 months

    The support policy gives every major 18 months of bug fixes and 2 years of security fixes, counted from its release. A new major comes about once a year, so two majors always overlap.

  5. Question 5 of 12 php artisan --version printed Laravel Framework 13.34.0. What do the three numbers say?

    Choose one answer.

    Show the answer: Question 5 of 12

    Answer: Major 13, minor 34, patch 0

    Major 13 may break code written for 12; minor 34 added features without breaking anything; patch 0 means no bug-fix release of 13.34 yet. The framework went from 13.0.0 to 13.34.0 in 28 weeks.

  6. Question 6 of 12 A tutorial you found installs Laravel 11 on PHP 8.2. You are setting up a new project on a server where you choose the PHP version. What do you do?

    Choose one answer.

    Show the answer: Question 6 of 12

    Answer: Install PHP 8.3 or newer and Laravel 13, because 11 gets no fixes and 13 needs 8.3

    A tutorial's versions are the ones of the day it was written. Start from the support table instead: the newest major with bug fixes, then the PHP range it needs.

  7. Question 7 of 12 What is a micro-framework such as Slim, at its core?

    Choose one answer.

    Show the answer: Question 7 of 12

    Answer: A dispatcher: it receives a request, calls the callback of the matching route and returns a response

    Slim's documentation calls it a dispatcher that receives an HTTP request, invokes a callback and returns a response, which is why the table marks it good for a few endpoints and poor for a database app with users.

  8. Question 8 of 12 For how many years does a Symfony long-term-support release receive security fixes?

    Type a number.

    Show the answer: Question 8 of 12

    Answer: 4 years

    Symfony's release process gives an LTS version 3 years of bug fixes and 4 years of security fixes, against 2 years of security fixes for each Laravel major.

  9. Question 9 of 12 A coaching centre wants staff logins, a fee table, a payment form that checks its fields, and a reminder email every morning. The team can upgrade the framework once a year. Which foundations does the table leave in?

    Choose one answer.

    Show the answer: Question 9 of 12

    Answer: Laravel and Symfony

    The first question rules out the micro-framework and plain PHP for an app with users; the second adds a caveat to Laravel only for teams that upgrade rarely. Both full frameworks stay in.

  10. Question 10 of 12 What does the MIT licence in the framework's LICENSE file allow?

    Choose one answer.

    Show the answer: Question 10 of 12

    Answer: Using, copying, changing and selling software built with it, as long as its copyright and licence notice stay with the copies

    MIT is a permissive licence: it grants use, copying, modification, merging, publishing, distribution, sublicensing and sale, on the condition that the copyright and permission notice stay in all copies.

  11. Question 11 of 12 Which of these is a hosted service, rather than a package that Composer installs into your project?

    Choose one answer.

    Show the answer: Question 11 of 12

    Answer: Laravel Cloud

    The first-party packages, Horizon, Pint and Tinker among them, are MIT code inside your project. Cloud, Forge and Nightwatch are services that run, manage or watch an app from outside it.

  12. Question 12 of 12 A teammate says: "Laravel costs money now, because Laravel Cloud has monthly plans." What is the accurate reply?

    Choose one answer.

    Show the answer: Question 12 of 12

    Answer: The framework and its first-party packages are MIT-licensed, and Cloud is one optional way to host an app

    Separate the code from the services: the framework, the skeleton and the first-party packages are MIT-licensed, while Cloud, Forge, Vapor, Nightwatch and Nova are commercial products that a project may use or ignore.

Interview questions

For a first job: what does a framework such as Laravel do for a PHP app that you would otherwise write yourself?

It takes over the work every web app repeats. Its router maps each URL and HTTP method to the code that answers it, and middleware runs checks, such as the CSRF token of a form, before that code runs. Blade writes the HTML and escapes every value printed between double braces, Eloquent turns database rows into objects, and migrations keep the tables in files. The validator checks input against rules, authentication and authorization decide who is logged in and what they may do, queues move slow work out of the request, and test helpers send fake requests to the app. Artisan generates the classes and runs the tasks. In plain PHP each of these is code you write and keep secure yourself; with Laravel you write the app’s own logic on top of them.

And one on versions: in Laravel Framework 13.34.0, what does each number say, and which kind of release may break your code?

Laravel follows semantic versioning, major.minor.patch. 13 is the major: a new one comes about once a year and may contain breaking changes, so moving from 12 to 13 is an upgrade you plan and test. 34 is the minor, counting the releases since 13.0 that added features, and 0 is the patch, counting bug-fix releases within 13.34. Minor and patch releases can come every week and should never break code, which is why composer.json asks for a caret range such as ^13.0: it accepts every 13.x release and stops before 14.0.

Two longer questions of the start-here bank grow out of this lesson, one about moving an app off a major that gets no fixes and one about a build that changed under a caret range:

Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.

  1. Mid to senior

    A coaching centre's fee app runs Laravel 10 on PHP 8.1 and receives no fixes from the framework. Plan its move to a supported release: the order of the steps, what each step needs before you run composer update, and how the app keeps working between steps.

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page. First step and follow-ups

  2. Fresher to mid

    composer.json asks for "laravel/framework": "^13.17". Staging ran 13.34.0 and its tests were green; the production build, made 17 days later, installed 13.37.0, and one page now fails. How can that happen when minor releases should not break code, and how do you make builds repeatable?

    Model answer, Pro. First step and follow-ups

Flashcards · 8 cards

Recall it, then check

Say the answer to yourself before you look: recalling it is what makes it stick.

  1. Which jobs does Laravel take over that every PHP web app would otherwise write for itself?

    Sending each URL to its code (the router and middleware), writing safe HTML (Blade), reading and writing the database (Eloquent and migrations), checking input (validation), knowing who is logged in and what they may do, slow or timed work (queues, events, the scheduler), test helpers and file generation with Artisan.

  2. In model-view-controller terms, what does each part of the notice-board page do?

    The Notice model holds the data, the Blade view holds the HTML, and NoticeController joins the two for one request. The router and the middleware decide before that whether the controller runs at all.

  3. How many of a new project's 122 Artisan commands generate classes, and why does that matter?

    37 of them start with make:, one for each kind of class (controller, model, migration, request, job, test and more). Each writes its file where the framework expects it, so every Laravel project keeps the same kind of file in the same place.

  4. How long does Laravel support each major release?

    18 months of bug fixes and 2 years of security fixes, counted from its release. Majors come about once a year, so two are usually in support, and a project still on a major more than two years old gets no security fixes.

  5. Which releases does the constraint ^13.17 on laravel/framework allow?

    Every release from 13.17.0 up to, but not including, 14.0.0. Under semantic versioning only a new major may break code, so a caret constraint takes new minors and patches and stops before the next major.

  6. Which PHP versions does Laravel 13 run on, and which is best for a new project?

    PHP 8.3 to 8.5. The oldest of them, 8.3, stops getting security fixes some months earlier than Laravel 13 does, while 8.5 is covered for longest, so start a new project on PHP 8.4 or 8.5.

  7. How much of a new Laravel project is Symfony code?

    31 of its 109 packages are Symfony's, 16 components once polyfills and contracts are left out. Laravel's request and response classes extend http-foundation, Artisan is built on console, and the router uses routing, so the choice of framework is about how much is decided for you.

  8. Is anything in the Laravel framework itself paid for?

    No. The framework and its first-party packages are MIT-licensed open source. What costs money are optional services and products sold beside them, such as Laravel Cloud, Forge and Nightwatch, and Nova's commercial licence.

Key takeaways

  • Laravel is a full-stack PHP framework that takes over the jobs every web app repeats: routing and middleware, Blade pages whose double braces escape every value, Eloquent and migrations, validation, logins, queues, test helpers and Artisan with its 37 make: generators.
  • Each Laravel major gets 18 months of bug fixes and 2 years of security fixes, so a new project starts on Laravel 13 with PHP 8.4 or 8.5 inside its 8.3 to 8.5 range, and its caret constraint takes every 13.x release while stopping before 14.
  • Laravel is built on 16 Symfony components; choose it for apps with users, forms and background work when the team accepts one default per job and regular upgrades, Symfony for a long stay on one release line, and a micro-framework or plain PHP for a few endpoints or for learning.
  • The framework and its first-party packages are MIT-licensed, the GPL lines in Composer’s report are a choice beside BSD-3-Clause, and what costs money are optional services such as Cloud, Forge and Nightwatch, plus Nova’s commercial licence.

Terms in this lesson

first-party package
A package made and maintained by the same team as the framework it extends, such as Laravel's Sanctum or Horizon, which an app installs with Composer only when it needs it.
model-view-controller (MVC)
A way to split an app's code into models, which hold the data and its rules, views, which turn data into what the user sees, and controllers, which take a request and join the two.
semantic versioning
A way of numbering releases as major.minor.patch: a new major version may break code written for the one before, a new minor adds features without breaking anything, and a patch only fixes bugs.
web framework
A set of libraries and conventions that does the work every web app repeats, such as sending each URL to the right code, writing pages, reading the database and checking input, so that you write only the part that is your own app.

References

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.