Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar.
History
Taylor Otwell created Laravel as an attempt to provide a more advanced alternative to the Code Igniter framework, which did not provide certain features such as built-in support for user authentication and authorization. Laravel’s first beta release was made available on June 9, 2011, followed by the Laravel 1 release later in the same month. Laravel 1 included built-in support for authentication, localisation, models, views, sessions, routing and other mechanisms, but lacked support for controllers that prevented it from being a true MVC framework.
Laravel Version | Release Date | PHP Version |
1.0 | June 2011 | |
2.0 | September 2011 | |
3.0 | February 2012 | |
3.1 | March 2012 | |
3.2 | May 2012 | |
4.0 | May 2013 | ≥ 5.3.0 |
4.1 | December 2013 | ≥ 5.3.0 |
4.2 | June 2014 | ≥ 5.4.0 |
5.0 | Feb 2015 | ≥ 5.4.0 |
5.1 LTS | June 2015 | ≥ 5.5.9 |
5.2 | Dec 2015 | ≥ 5.5.9 |
5.3 | August 2016 | ≥ 5.6.4 |
5.4 | January 2017 | ≥ 5.6.4 |
5.5 LTS | August 2017 | ≥ 7.0.0 |
5.6 | Feb 2018 | ≥ 7.1.3 |
5.7 | Sep 2018 | ≥ 7.1.3 |
5.8 | Feb 2019 | ≥ 7.1.3 |
6 LTS | Sep 2019 | 7.2 – 8.0 |
7 | March 2020 | 7.2 – 8.0 |
8 | Sep 2020 | 7.2 – 8.0 |
9 | Feb 2022 | 7.2 – 8.1 |
10 | Feb 2023 | ≥ 8.1 |
Features
- Bundles provide a modular packaging system since the release of Laravel 3, with bundled features already available for easy addition to applications. Furthermore, Laravel 4 uses Composer as a dependency manager to add framework-agnostic and Laravel-specific PHP packages available from the Packagist repository.
- Eloquent ORM (object-relational mapping) is an advanced PHP implementation of the active record pattern, providing at the same time internal methods for enforcing constraints on the relationships between database objects. Following the active record pattern, Eloquent ORM presents database tables as classes, with their object instances tied to single table rows.
- Query builder, available since Laravel 3, provides a more direct database access alternative to the Eloquent ORM. Instead of requiring SQL queries to be written directly, Laravel’s query builder provides a set of classes and methods capable of building queries programmatically. It also allows selectable caching of the results of executed queries.
- Application logic is an integral part of developed applications, implemented either by using controllers or as part of the route declarations. The syntax used to define application logic is similar to the one used by Sinatra framework.
- Reverse routing defines a relationship between the links and routes, making it possible for later changes to routes to be automatically propagated into relevant links. When the links are created by using names of existing routes, the appropriate uniform resource identifiers (URIs) are automatically created by Laravel.
- Restful controllers provide an optional way for separating the logic behind serving HTTP GET and POST requests.
- Class auto loading provides automated loading of PHP classes without the need for manual maintenance of inclusion paths. On-demand loading prevents inclusion of unnecessary components, so only the actually used components are loaded.
- View composers serve as customizable logical code units that can be executed when a view is loaded.
- Blade templating engine combines one or more templates with a data model to produce resulting views, doing that by transpiling the templates into cached PHP code for improved performance. Blade also provides a set of its own control structures such as conditional statements and loops, which are internally mapped to their PHP counterparts. Furthermore, Laravel services may be called from Blade templates, and the templating engine itself can be extended with custom directives.
- IoC containers make it possible for new objects to be generated by following the inversion of control (IoC) principle, in which the framework calls into the application- or task-specific code, with optional instantiating and referencing of new objects as singletons.
- Migrations provide a version control system for database schemas, making it possible to associate changes in the application’s code base and required changes in the database layout. As a result, this feature simplifies the deployment and updating of Laravel-based applications.
- Database seeding provides a way to populate database tables with selected default data that can be used for application testing or be performed as part of the initial application setup.
- Unit testing is provided as an integral part of Laravel, which itself contains unit tests that detect and prevent regressions in the framework. Unit tests can be run through the provided artisan command-line utility.
- Automatic pagination simplifies the task of implementing pagination, replacing the usual manual implementation approaches with automated methods integrated into Laravel.
- Form request is a feature of Laravel 5 that serves as the base for form input validation by internally binding event listeners, resulting in automated invoking of the form validation methods and generation of the actual form.
- Homestead – a Vagrant virtual machine that provides Laravel developers with all the tools necessary to develop Laravel straight out of the box, including, Ubuntu, Gulp, Bower and other development tools that are useful in developing full scale web applications.
- Lazy Collection – This feature of the PHP framework Laravel primarily enables you to deal with heavy loads of data, while keeping the memory usage low. Moreover, when you switch from all ( _ to cursor ( ), just one expressive model is moved within the memory at a time as cursor ( ) makes use of the Lazy Collection instance.
First-Party Packages
- Cashier, introduced in Laravel 4.2, provides an interface for managing subscription billing services provided by Stripe, such as handling coupons and generating invoices.
- Envoy, introduced in Laravel 4.2, provides a clean, minimal syntax for defining common tasks you run on your remote servers. Using Blade style syntax, you can easily setup tasks for deployment, Artisan commands, and more.
- Socialite, provides simplified mechanisms for authentication with different OAuth providers, including Facebook, Twitter, Google, GitHub and Bitbucket.
- Passport, introduced in Laravel 5.3, provides a full OAuth2 server implementation for your Laravel application in a matter of minutes.
- Scout, introduced in Laravel 5.3, provides a simple, driver based solution for adding full-text search to your Eloquent models.
- Dusk, introduced in Laravel 5.4, provides an expressive, easy-to-use browser automation and testing API.
- Horizon, introduced in Laravel 5.5, provides a visual dashboard and code-driven configuration for your Laravel powered Redis queues.
- Telescope, introduced in Laravel 5.7, provides insight into the requests coming into your application, exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps and more.
- Sanctum, introduced in Laravel 7.0, provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs. Firstly called Laravel Airlock, it has been renamed due to a trademark dispute regarding the name ‘Airlock.’
- Jetstream, introduced in Laravel 8.0, this providing an application scaffold for Laravel. This package effectively builds on the idea of the UI tools built into past Laravel applications allowing the user to pick between two options, Livewire + Blade or Inertia.js + Vue. This package works with Laravel Fortify. There was some controversy with Taylor Otwell and Laravel users shortly after Laravel’s release due to some believing old application scaffolds were being deprecated in favour of Jetstream. It has since been clarified this is not the case.
- Fortify, introduced in Laravel 8.0, providing an application scaffold for Laravel. Fortify is used to handle the manage of typical user tasks, building upon typical authentication to provide things like teams and two-factor authentication mechanisms. The package works closely with Laravel Jetstream. Fortify is somewhat based on features which were originally created for Laravel Spark.
- Breeze, Laravel Breeze is a minimal, simple implementation of all of Laravel’s authentication features, including login, registration, password reset, email verification, and password confirmation. Laravel Breeze’s default view layer is made up of simple Blade templates styled with Tailwind CSS. Breeze provides a wonderful starting point for beginning a fresh Laravel application.