Skip to main content

Laravel

Pronunciation
LAR-uh-vel
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/laravel

In short

Laravel is a PHP framework for full web applications, with an elegant syntax and built-in routing, the Eloquent ORM, authentication, queues and migrations.

What is Laravel?

Laravel was created by Taylor Otwell and first released in 2011, and it has since become the most popular PHP framework. It follows the MVC pattern: routes send requests to controllers, Eloquent models represent database tables, and Blade templates render the HTML. Much of the everyday work, from validation to sending email, is a short, readable method call.

Eloquent is an active record ORM: a Post model maps to a posts table, and Post::where('published', true)->latest()->get() reads like a sentence. Migrations keep the database schema in version-controlled code, and the Artisan command line generates files, runs migrations, starts queue workers and schedules tasks.

Around the framework is an ecosystem of official tools: Breeze and Jetstream for login and registration scaffolding, Sanctum for API tokens, Horizon for queue monitoring, Livewire for interactive pages without much JavaScript, and Forge and Vapor for deployment. That completeness is a big reason teams choose it for SaaS products and business applications.

A common misconception is that PHP, and therefore Laravel, is outdated. Modern PHP is fast and typed, and Laravel offers features comparable to Rails or Django. Like them, it rewards following its conventions; fighting them usually makes a Laravel app harder to maintain.

Key takeaways

  • Laravel is the most popular PHP framework, first released in 2011.
  • It uses MVC with routes, controllers, Eloquent models and Blade views.
  • Eloquent is an expressive active record ORM; migrations version the schema.
  • Artisan, queues, scheduling and auth scaffolding come built in.
  • Official tools such as Sanctum, Horizon and Livewire extend it.

Example

A route, a model and a queryphp
<?php
// routes/web.php
use App\Models\Post;
use Illuminate\Support\Facades\Route;

Route::get('/posts', function () {
    $posts = Post::where('published', true)
        ->latest()
        ->take(10)
        ->get();

    return view('posts.index', ['posts' => $posts]);   // resources/views/posts/index.blade.php
});

// app/Models/Post.php
class Post extends \Illuminate\Database\Eloquent\Model
{
    protected $fillable = ['title', 'body', 'published'];
}

// php artisan make:model Post --migration   generates the model and a migration

Readers ask

Is Laravel a frontend or backend framework?

Backend. Laravel runs on the server in PHP. It can render HTML with Blade, or act as an API for a front end built with Vue, React or Inertia.

What is Eloquent?

Laravel's ORM. Each model class represents a database table, and you query and save records with PHP methods instead of writing SQL by hand.

Laravel or Symfony?

Both are mature PHP frameworks. Laravel focuses on developer convenience and an all-in-one ecosystem; Symfony offers reusable components and is often chosen for large, highly customized systems. Laravel itself uses several Symfony components.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings