Software:Laravel

From HandWiki
Revision as of 13:36, 9 February 2024 by Rtexter1 (talk | contribs) (over-write)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Open source web application framework, written in PHP
Laravel
Laravel logo
Developer(s)Taylor Otwell
Initial releaseJune 2011; 13 years ago (2011-06)[1]
Repositorygithub.com/laravel/framework
Written inPHP
TypeWeb framework
LicenseMIT License
Websitelaravel.com

Laravel is a free and open-source PHP web framework,[2] 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.[3][4]:2,5–9[5][6]

The source code of Laravel is hosted on GitHub and licensed under the terms of MIT License.[7]

History

Taylor Otwell created Laravel as an attempt to provide a more advanced alternative to the CodeIgniter 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.[1]

Laravel 2 was released in September 2011, bringing various improvements from the author and community. Major new features included the support for controllers, which made Laravel 2 a fully MVC-compliant framework, built-in support for the inversion of control (IoC) principle, and a templating system called Blade. As a downside, support for third-party packages was removed in Laravel 2.[1]

Laravel 3 was released in February 2012 with a set of new features including the cmd command-line interface (CLI) named Artisan, built-in support for more database management systems, database migrations as a form of version control for database layouts, support for handling events, and a packaging system called Bundles. An increase of Laravel's userbase and popularity lined up with the release of Laravel 3.[1]

Laravel 4, codenamed Illuminate, was released in May 2013. It was made as a complete rewrite of the Laravel framework, migrating its layout into a set of separate packages distributed through Composer, which serves as an application-level package manager. Such a layout improved the extensibility of Laravel 4, which was paired with its official regular release schedule spanning six months between minor point releases. Other new features in the Laravel 4 release include database seeding for the initial population of databases, support for message queues, built-in support for sending different types of email, and support for delayed deletion of database records called soft deletion.[1][8]:18–19

Laravel 5 was released in February 2015 as a result of internal changes that ended up in renumbering the then-future Laravel 4.3 release. New features in the Laravel 5 release include support for scheduling periodically executed tasks through a package called Scheduler, an abstraction layer called Flysystem that allows remote storage to be used in the same way as local file systems, improved handling of package assets through Elixir, and simplified externally handled authentication through the optional Socialite package. Laravel 5 also introduced a new internal directory tree structure for developed applications.[4]:13–14[9]

Lumen 5.0 is the initial release of the Lumen framework, a light derivative of Laravel optimized for speed.[10] This initial release is based on the Laravel 5.x series of PHP components, and following versions reflect the Laravel versions with which it shares common infrastructure.[11] As of 2022, authors no longer recommend the use of Lumen for gaining these advantages, and promote Laravel Octane instead.[12]

Laravel 5.1, released in June 2015, was the first release of Laravel to receive long-term support (LTS). New LTS versions were planned for one every two years.[13]

Laravel 5.3 was released on August 23, 2016. The new features in 5.3 are focused on improving developer speed by adding additional out of the box improvements for common tasks.[14]

Laravel 5.4 was released on January 24, 2017, with many new features like Laravel Dusk, Laravel Mix, Blade Components and Slots, Markdown Emails, Automatic Facades, Route Improvements, Higher Order Messaging for Collections, and many others.[15]

Laravel 6 was released on September 3, 2019, shift blueprint code generation, introducing semantic versioning, compatibility with Laravel Vapor, improved authorization responses, improved job middleware, lazy collections, and sub-query improvements. The frontend scaffolding was removed from the main package and moved into the laravel/ui package.[16]

Laravel 7 was released on March 3, 2020, with new features like Laravel Sanctum, Custom Eloquent Casts, Blade Component Tags, Fluent String Operations and Route Model Binding Improvements.[17]

Laravel 8 was released on September 8, 2020, with new features like Laravel Jetstream, model factory classes, migration squashing, Tailwind CSS for pagination views and other usability improvements.[18]

Laravel 9 was released on February 8, 2022.[11]

Laravel 10 was released on February 14, 2023.[19]

Release history

Versions designated LTS were supported with bug fixes for 2 years and security fixes for 3 years. Other releases were supported with bug fixes for 6 months and security fixes for 1 year.[20] As of version 8, major versions are released yearly, and the support timeline is: bug fixes for 18 months and security fixes for 2 years, for all releases. For additional libraries, only the latest major release receives bug fixes.[18]


Version Release date PHP version
1.0 June 2011
2.0 September 2011
3.0 February 22, 2012
3.1 March 27, 2012
3.2 May 22, 2012
4.0 May 28, 2013 ≥ 5.3.0
4.1 December 12, 2013 ≥ 5.3.0
4.2 June 1, 2014 ≥ 5.4.0
5.0 February 4, 2015 ≥ 5.4.0
5.1 LTS June 9, 2015 ≥ 5.5.9
5.2 December 21, 2015 ≥ 5.5.9
5.3 August 23, 2016 ≥ 5.6.4
5.4 January 24, 2017 ≥ 5.6.4
5.5 LTS August 30, 2017 ≥ 7.0.0
5.6 February 7, 2018 ≥ 7.1.3
5.7 September 4, 2018 ≥ 7.1.3
5.8 February 26, 2019 ≥ 7.1.3
6 LTS September 3, 2019 7.2 – 8.0[21]
7 March 3, 2020[22] 7.2 – 8.0[18]
8 September 8, 2020 7.3 – 8.1[23]
9 February 8, 2022[21] 8.0 – 8.1[21]
10 February 14, 2023 ≥ 8.1[19]
11 Q1 2024 ≥ 8.2

{{{2}}}

Source: Laravel[18][24]

Features

The following features serve as Laravel's key design points (where not specifically noted, descriptions refer to the features of Laravel 3):[3][4]:5–9[5][6][25]

  • 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.[26]
  • 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.[27]
  • 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.[28]
  • 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.[29][30]
  • 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 codebase and required changes in the database layout. As a result, this feature simplifies the deployment and updating of Laravel-based applications.[31]
  • 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.[31]
  • Unit testing is provided as an integral part of Laravel,[8]:61–62 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.[32]
  • Sail - Sail provides a great starting point for building a Laravel application using PHP, MySQL, and Redis without requiring prior Docker experience.[33]
  • Valet - Tooling to set up quickly a minimalist PHP local development environment on your Mac using the power of Homebrew, Nginx and DnsMasq.[34]

First-party packages

Ready-to-use packages provided by Laravel through Composer and Packagist include the following:

  • Cashier, introduced in Laravel 4.2, provides an interface for managing subscription billing services provided by Stripe, such as handling coupons and generating invoices.[35]
  • 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 set up tasks for deployment, Artisan commands, and more.[36]
  • Socialite, provides simplified mechanisms for authentication with different OAuth providers, including Facebook, Twitter, Google, GitHub and Bitbucket.[37]
  • Passport, introduced in Laravel 5.3, provides a full OAuth2 server implementation for your Laravel application in a matter of minutes.[38]
  • Scout, introduced in Laravel 5.3, provides a simple, driver based solution for adding full-text search to your Eloquent models.[39]
  • Dusk, introduced in Laravel 5.4, provides an expressive, easy-to-use browser automation and testing API.[40]
  • Horizon, introduced in Laravel 5.5, provides a visual dashboard and code-driven configuration for your Laravel powered Redis queues.[41]
  • 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.[42]
  • Sanctum, introduced in Laravel 7.0, provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs.[43] Firstly called Laravel Airlock, it has been renamed due to a trademark dispute regarding the name ‘Airlock.'[44]
  • 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.[45] 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.[46]
  • 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.[47] 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[citation needed] starting point for beginning a fresh Laravel application.

Laravel's command-line interface (CLI), called Artisan, was 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 the availability of additional Artisan features in Laravel 4.

The features of Artisan are mapped to different subcommands of the Artisan command-line utility, providing functionality that aids in managing and building Laravel-based applications. Common uses of Artisan include managing database migrations and seeding, publishing package assets, and generating boilerplate code for new controllers and migrations; the latter frees the developer from creating proper code skeletons. The functionality and capabilities of Artisan can also be expanded by implementing new custom commands, which, for example, may be used to automate application-specific recurring tasks.

Conferences

Taylor Otwell at the 2013 US Laracon

Laracon is the official Laravel conference centered around the Laravel framework, covering its development, uses, and related general software development topics. Laracon has taken place in the United States , Europe and online in the past.[48][49] Typically, the conference happens in the United States and Europe every year. 2017 was the first year a Laracon was held as an online event only. 2018 was the first year a Laracon was held in Australia. Each year the conference has a different variety of sponsors and organizers, but Laravel, Laravel News and UserScape are usually the primary organizers.

While the numerous Laracon conferences are officially run, a number of other conferences are run under the name of Laravel Live. Currently, there are yearly held Laravel Live UK, Laravel Live Denmark and Laravel Live India conferences.[50][51][52] While these are not officially run, they have the permission of Taylor Otwell to use the name Laravel.

See also

References

  1. 1.0 1.1 1.2 1.3 1.4 Maks Surguy (July 27, 2013). "History of the Laravel PHP framework, Eloquence emerging". http://maxoffsky.com/code-blog/history-of-laravel-php-framework-eloquence-emerging/. 
  2. "The real-time community site Voten goes open-source" (in en). 2017-06-16. https://laravel-news.com/voten-open-source. 
  3. 3.0 3.1 Daniel Gafitescu (June 6, 2013). "Goodbye CodeIgniter, Hello Laravel". http://www.sitepoint.com/goodbye-codeigniter-hello-laravel/. 
  4. 4.0 4.1 4.2 Martin Bean (April 2015). Laravel 5 Essentials. Packt. ISBN 978-1785283017. https://books.google.com/books?id=BWO4CAAAQBAJ. Retrieved September 2, 2015. 
  5. 5.0 5.1 "Laravel Documentation (versions 3.0–3.2.14)". http://three.laravel.com/docs. 
  6. 6.0 6.1 "Laravel Documentation (version 4.2)". http://laravel.com/docs. 
  7. "laravel/framework: The Laravel Framework". https://github.com/laravel/framework. 
  8. 8.0 8.1 Raphaël Saunier (January 2014). Getting Started with Laravel 4. Packt. ISBN 978-1783287031. OCLC 868960968. 
  9. Eric Barnes (January 30, 2015). "Laravel 5". http://laravel-news.com/2015/01/laravel-5/. 
  10. "Introducing Lumen from Laravel" (in en). https://mattstauffer.com/blog/introducing-lumen-from-laravel/. 
  11. 11.0 11.1 "Release Notes - Laravel - The PHP Framework For Web Artisans". https://laravel.com/docs/9.x/releases. 
  12. Sorgner, Stefan Lorenz (2021-11-04), "The End as a New Beginning", We Have Always Been Cyborgs (Policy Press): pp. 185–187, doi:10.1332/policypress/9781529219203.003.0005, ISBN 9781529219203, http://dx.doi.org/10.1332/policypress/9781529219203.003.0005, retrieved 2022-07-25 
  13. Eric L. Barnes (June 9, 2015). "Laravel 5.1 is released". https://laravel-news.com/2015/06/laravel-5-1-released/. 
  14. Eric L. Barnes (August 23, 2016). "Laravel  5.3 is now released". https://laravel-news.com/2016/08/laravel-5-3-is-now-released/. 
  15. "Laravel 5.4 Is Now Released" (in en-US). Laravel News. 2017-01-24. https://laravel-news.com/laravel-5-4. 
  16. "Laravel 6 release notes". https://laravel.com/docs/6.x/releases#laravel-6. 
  17. "Release Notes - Laravel - The PHP Framework For Web Artisans". https://laravel.com/docs/7.x/releases. 
  18. 18.0 18.1 18.2 18.3 "Release Notes - Laravel - The PHP Framework For Web Artisans". https://laravel.com/docs/8.x/releases. 
  19. 19.0 19.1 "Laravel 10 is released". https://laravel-news.com/laravel-10. 
  20. "Laravel Documentation: Releases". Laravel. https://laravel.com/docs/5.4/releases/. 
  21. 21.0 21.1 21.2 "Laravel 9 is Now Released". https://laravel-news.com/laravel-9-released. 
  22. @laravelphp (February 12, 2020). "We are aiming to release Laravel 7.x...". https://twitter.com/laravelphp/status/1227607366717321216. 
  23. "Laravel: PHP 8 Support". Laravel. November 26, 2020. https://blog.laravel.com/laravel-php-8-support. 
  24. "Github Repository Release Notes - Laravel". Laravel. https://github.com/laravel/laravel/releases. 
  25. Jeffrey Way (November 28, 2012). "Why Laravel is Taking the PHP Community by Storm". http://code.tutsplus.com/tutorials/why-laravel-is-taking-the-php-community-by-storm--pre-52639. 
  26. "Laravel documentation (version 4.2): Package development". http://laravel.com/docs/packages. 
  27. "Develop Faster with the Laravel PHP Framework". http://www.developer.com/lang/php/develop-faster-with-the-laravel-php-framework.html. 
  28. "Laravel documentation (version 4.0): Query builder". http://laravel.com/docs/4.0/queries. 
  29. "Laravel documentation (version 5.1): Blade Templates". http://laravel.com/docs/5.1/blade. 
  30. Dayle Rees (2014). "Laravel Blade engine". http://daylerees.com/codebright/blade. 
  31. 31.0 31.1 "Laravel documentation (version 5.0): Migrations and seeding". http://laravel.com/docs/5.0/migrations. 
  32. "Laravel Homestead - Laravel the PHP Framework for Web artisans". https://laravel.com/docs/5.3/homestead. 
  33. "Laravel Sail - Laravel - The PHP Framework for Web artisans". https://laravel.com/docs/10.x/sail. 
  34. "Laravel Valet". April 26, 2023. https://laravel.com/docs/10.x/valet. 
  35. "Laravel Cashier - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/billing. 
  36. "Laravel Envoy - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/envoy. 
  37. "Laravel Socialite - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/socialite. 
  38. "Laravel Passport - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/passport. 
  39. "Laravel Scout - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/scout. 
  40. "Laravel Dusk - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/dusk. 
  41. "Laravel Horizon - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/horizon. 
  42. "Laravel Telescope - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/telescope. 
  43. "Laravel Sanctum - Laravel - The PHP Framework For Web Artisans". laravel.com. https://laravel.com/docs/master/sanctum. 
  44. "Laravel Airlock Renamed to Sanctum". PAUL REDMOND. https://laravel-news.com/laravel-airlock-renamed-to-sanctum. 
  45. "Introduction | Laravel Jetstream". https://jetstream.laravel.com/1.x/introduction.html. 
  46. Otwell, Taylor (5 October 2020). "Jetstream Discussion". https://www.youtube.com/watch?v=krn39HjxPTs. 
  47. laravel/fortify, The Laravel Framework, 2020-10-16, https://github.com/laravel/fortify, retrieved 2020-10-16 
  48. "Laracon Online | The official worldwide Laravel online conference" (in en). https://laracon.net/. 
  49. "Search Results" (in en). https://laravel-news.com/search?q=laracon. 
  50. "Laravel Live UK | Home". https://laravellive.uk/. 
  51. "Laravel Live Denmark 2024". https://laravellive.dk/. 
  52. "Laravel Live India Community" (in en-US). https://laravellive.in/. 

Further reading

  • Laravel Design Patterns and Best Practices, Packt, ISBN:978-1783287987, July 2014, by Arda Kılıçdağı and H. İbrahim Yilmaz

External links