Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Laravel is a PHP framework for building full-stack web applications and APIs. It gives an application a conventional structure and ready-to-use building blocks for routing, middleware, database access, validation, queues, scheduled tasks, testing, and deployment. Laravel 13 is the current documented major branch; its 13.x changelog sets PHP 8.3 as the minimum. Check the precise Laravel release and the PHP version supported by your packages before starting a new project.

What Laravel is—and what it provides

Laravel is a framework, not a programming language or a web server. You write application code in PHP and use Laravel’s conventions and services to handle common web-development work. A request can pass through routes and middleware to a controller, be validated, read or update database records through Eloquent, and return either a rendered view or an API response.

The framework also includes facilities for configuration, authentication and authorization, events, notifications, background jobs, scheduled work, and automated tests. These are parts of the normal Laravel workflow: you can start with a simple page and add the facilities your application needs rather than assembling every layer from scratch.

Laravel’s annual major-release cadence means compatibility is version-sensitive. The current documented major branch is Laravel 13, and its 13.x changelog states PHP 8.3 as the minimum. Confirm the exact minor version, PHP runtime, database, and package compatibility for your deployment; do not assume instructions for Laravel 12 apply unchanged.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Install Laravel 13 and run a starter application

You need PHP 8.3 or later, Composer, and a database if your application will persist data. The database driver and any PHP extensions required by your chosen packages must also be installed. Composer manages PHP dependencies; the Laravel installer is an optional way to create projects.

  1. Create a project with Composer: run composer create-project laravel/laravel my-app. This creates the project directory and installs its Composer dependencies.
  2. Enter the project: run cd my-app.
  3. Configure the environment: review the generated .env file. Set the database connection and credentials for your environment before running database-backed features. Keep secrets out of source control.
  4. Run database migrations when ready: after configuring a supported database, run php artisan migrate. Migrations create or update tables defined by the application.
  5. Start Laravel’s local development server: run php artisan serve, then open the local address printed by the command in your browser.

The standard project template includes example tests and supports Pest or PHPUnit. Run php artisan test from the project directory to execute the configured test suite. A successful local run is not a substitute for checking production PHP extensions, database access, environment variables, and file permissions.

How a Laravel request moves through the application

A useful way to learn the framework is to trace one request rather than memorize directories. In a typical web request, a route matches the HTTP method and path, middleware can inspect or modify the request, and a controller coordinates validation and application behavior. The controller can ask Eloquent to retrieve or save data, then return a Blade view or a response such as JSON.

Routes, middleware, and controllers

HTTP routes live in the routes area, with web and API entry points separated according to their purpose. Middleware handles cross-cutting checks around requests. Controllers keep route declarations from accumulating application logic. For inputs that need structured validation, form requests provide a place to define and run those rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, a minimal web route can return a view:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
<?php

use IlluminateSupportFacadesRoute;

Route::get('/hello', function () {
    return view('hello', ['name' => 'Laravel']);
});

The corresponding Blade template can render the supplied value:

<h1>Hello, {{ $name }}</h1>

In a larger application, move the route’s work into a controller and keep data validation close to the operation that accepts the input. Validate data before using it to create or update records; do not treat a browser form as a trusted source.

Configuration and storage

Application configuration is organized in the configuration area, while environment-specific values belong in the environment configuration rather than being hard-coded into application logic. The storage directory is used for items such as logs, compiled Blade templates, file-based sessions and caches, and generated files. In deployment, ensure the application can write to the directories required by the features you use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand the Laravel project layout

Area What it is for
app Application code, including controllers, middleware, jobs, and other classes.
bootstrap and config Application bootstrapping and configuration.
routes HTTP and console entry points.
storage Logs, compiled views, file-backed runtime data, and generated files.
tests Automated unit and feature tests.
vendor Dependencies installed by Composer; do not edit dependency files here by hand.

The exact set of files can vary with the Laravel version and the choices made when creating a project. Treat the installed project and its version-specific documentation as authoritative when a path or bootstrap convention differs.

Choose Blade, Livewire, Vue, React, or an API

Laravel does not force every application into one rendering model. Pick the approach that fits the interface, interaction requirements, deployment shape, and the skills of the team maintaining it.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Approach Good fit when Trade-off to consider
Blade Pages are primarily server-rendered and the team wants a direct PHP-and-template workflow. Highly interactive interfaces may need additional client-side behavior.
Livewire You want interactive components while keeping much of the application workflow in Laravel. Understand the component lifecycle and interaction model before using it for every interface.
Vue or React The product needs a JavaScript-led interface or the team already works effectively in that ecosystem. There is more frontend architecture and client/server coordination to maintain.
Stateless API Clients such as mobile apps or separate frontends need data and actions rather than server-rendered pages. Plan API authentication, authorization, validation, and compatibility as explicit concerns.

Session-authenticated web routes suit browser workflows built around Laravel-rendered pages. An API often needs a stateless request model and an appropriate token-authentication approach. Choose based on the clients and security model, not on the assumption that one style is universally more modern.

Use Eloquent, migrations, and relationships

Eloquent is Laravel’s Active Record style ORM: model classes represent records and provide a framework-integrated way to query and persist them. Migrations describe database schema changes in version-controlled code, so a team can apply the same schema evolution across development, test, and production environments.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A basic model query might look like this:

$posts = Post::where('published', true)
    ->latest()
    ->get();

Define relationships on models when your data has associations, then use those relationships to express the association in application code. For example, a post may belong to an author. When returning related data, pay attention to query count: eager-load relationships needed by a page or response rather than triggering a separate query for every item in a loop.

Use migrations to change schema, and validate incoming values before persistence. For larger applications, consider transaction boundaries and indexes based on the actual queries and integrity rules your application needs. Those are database design decisions, not automatic guarantees provided merely by using an ORM.

Add background jobs and scheduled tasks

Queue jobs are for work that should run outside the immediate web response, such as a slow operation that can be completed asynchronously. A job represents the work; a queue connection and worker process are needed to execute queued jobs. In production, configure and supervise the worker process using infrastructure appropriate to your deployment. A job that is dispatched but has no functioning worker will remain unprocessed.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Scheduled tasks let you describe recurring commands or work in the application’s scheduling layer. The host environment still needs to invoke Laravel’s scheduler as configured for that deployment. Check both sides: the task must be scheduled in the application, and the runtime must trigger the scheduler. Use retries and failure handling deliberately for work that may fail or be delivered more than once.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test Laravel applications early

Laravel’s project structure includes automated tests, and php artisan test runs the configured suite. Unit tests are useful for isolated logic; feature tests exercise larger behavior such as routes, validation, database interactions, and responses. Write tests around important user-visible outcomes rather than only around implementation details.

Keep test configuration separate from production configuration, particularly for database access and external services. A test passing locally does not prove that a deployed worker, scheduler, file store, or production database is configured correctly; cover operationally important paths in deployment checks as well.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan deployment around your operating model

Laravel applications can run on self-managed infrastructure or use ecosystem deployment products. Laravel Cloud is a first-party deployment option; Forge is an infrastructure-management option; Vapor is a Laravel-focused AWS serverless deployment product. These options differ in the infrastructure model and operations they place in your hands. Compare them against the application’s runtime needs, team experience, region and provider requirements, and the way you intend to operate queues and scheduled tasks.

Pricing, included capabilities, regional availability, and support terms can change. Check current product terms before selecting a service. Whichever path you choose, verify PHP and package compatibility, environment configuration, database connectivity, writable storage, queue workers, scheduler execution, and a repeatable deployment process. A successful deployment of the web process alone does not establish that asynchronous work is running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Laravel’s wider ecosystem includes products and packages for administration, payments, browser testing, real-time events, queue monitoring, authentication, and debugging. PhpStorm documents framework-aware support for Blade, Eloquent, routes, views, translations, components, code generation, and navigation; Laravel also documents a VS Code extension with Laravel-focused editor features. Choose an IDE based on your workflow and verify current feature availability in the product documentation.

Capture a page from a Laravel application

For a quick visual check, first run the app locally with php artisan serve, open the page in a browser, and use the browser’s screenshot or print-to-PDF function. This is suitable for a manual spot check. The local address is normally reachable only from your own machine, so a remote screenshot service cannot capture it unless you expose a reachable URL through an appropriate development or staging setup. Avoid exposing private application data just to take a screenshot.

Or skip the browser setup

For a publicly reachable page, ScreenshotNeo can return a screenshot or PDF from one GET request. For example, this cURL request captures Laravel’s public website as a WebP image:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://laravel.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server exposes screenshot, page-info, and PDF-capture tools for AI agents. Plans include 1,000 screenshots per month free with no card, while paid plans start at $5 for 3,000. Try ScreenshotNeo free to get 1,000 screenshots a month without a card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot common setup and runtime problems

  • Composer reports a PHP version conflict: Laravel 13’s 13.x changelog sets PHP 8.3 as the minimum. Check which PHP binary Composer is using and align the CLI and deployment runtimes with the framework and package requirements.
  • The application cannot connect to its database: check the database settings in .env, ensure the database service is running and reachable, and confirm that the configured database and credentials exist. Then rerun the migration command.
  • A migration fails: inspect the first database error, confirm the selected database driver and schema permissions, and fix the migration or environment configuration before retrying. Do not assume a failed migration left the schema untouched.
  • A queued job never runs: verify the selected queue connection and that a worker is running with the application’s current configuration. Inspect logs and failed-job handling for the cause.
  • A scheduled task does not fire: confirm the application defines the task and that the host or platform invokes Laravel’s scheduler at the required cadence.
  • A page works locally but fails after deployment: compare PHP versions, required extensions, environment values, writable storage, and database or service access between the local and deployed environments.
  • A route returns an unexpected response: check the HTTP method and path, route middleware, validation behavior, and whether the controller returns a view, redirect, or API response appropriate to that route.

A practical learning sequence

  1. Learn enough PHP and Composer to read classes, namespaces, dependencies, and configuration.
  2. Create a small Laravel application and trace one request through a route, middleware, controller, validation, model, and view or JSON response.
  3. Add a migration and an Eloquent relationship, then test the behavior with a feature test.
  4. Introduce authentication, authorization, events, notifications, queues, and scheduled tasks only as your application needs them.
  5. Deploy a small application and verify its database, storage, worker, scheduler, and test workflow rather than stopping at a successful page load.

This sequence builds understanding around an actual request and data flow. It also makes Laravel’s conventions easier to evaluate: you can see which framework facilities simplify your application and which operational pieces still need deliberate configuration.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.