Lavarel is a PHP web application framework which follows the model-view-controller pattern. It was created by Taylor Otwell and released initially in 2011. It features its own templating system, a packaging system with a dedicated dependency manager and a range of utilities to aid server deployment.
Lavarel is considered to be the most popular PHP framework as of writing, and is also the most watched PHP project on GitHub. The framework was created as a more feature rich alternative to existing PHP frameworks such as CodeIgniter which lacked support for various requirements such as user authentications and authorization.
The system is currently on its 5th version, Lavaer 5 being released in February 2015. This latest iteration brings new features and upgrades to existing ones, such as support for scheduling periodically executed tasks using "Scheduler", "Flysystem" for remote storage, handling of package assets with "Elixir" and further development external authorization with "Socialite"
The following features serve as Laravel's key design points
- Bundles provide a modular packaging system since the release of Laravel 3, with numerous 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 a 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 4, 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.
- 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.
- 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.
- Migrations provide a version control system for database schemas, making it possible to associate changes in the application's codebase and required changes in the database layout. As a result, the deployment and updating of applications is significantly simplified.
- 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 plays an important role in Laravel, which itself contains numerous 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.
Artisan is the Laravel's command-line interface (CLI), initially introduced in Laravel 3 with a limited set of capabilities. Laravel's later migration to a Composer-based architecture allowed Artisan to incorporate different components from the Symfony framework, resulting in an enriched feature set of Artisan features in Laravel 4.
Through the artisan command-line utility, Artisan provides various capabilities that aid in managing and building Laravel applications. Available through different artisan commands, its common uses include managing database migrations and seeding, publishing package assets, and generating boilerplate code for new controllers and migrations, which frees the developer from creating proper code skeletons. Furthermore, Artisan allows the developer to further expand its capabilities by implementing new commands.