Jump to content

Laravel: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
217IP (talk | contribs)
{{Anchor|LARACON}}Conferences: Added 2015 Laracon info (edited with ProveIt)
Undid revision 670570793 by 217IP (talk) We'll add those Laracons once they've been held, Wikipedia is not a news website
Line 185: Line 185:
| accessdate = {{date|2014-01-02|mdy}}
| accessdate = {{date|2014-01-02|mdy}}
| website = userscape.com
| website = userscape.com
}}</ref> {{As of|2015|07|lc=yes}}, the following Laracons have been held or are planned:<ref>{{Cite web
}}</ref> {{As of|2014|08|lc=yes}}, the following Laracons have been held:<ref>{{Cite web
| url = http://wiki.laravel.io/Laracon
| url = http://wiki.laravel.io/Laracon
| title = Laravel documentation: Laracon
| title = Laravel documentation: Laracon
Line 191: Line 191:
| website = laravel.io
| website = laravel.io
}}</ref>
}}</ref>
<ref name="2015con">{{cite web | url=https://laravel-news.com/2015/02/laracon-2015-conference-sites-launched/ | title=Laracon 2015 Conference Sites Launched | date=3 February 2015 | accessdate=8 July 2015}}</ref>


{| class="wikitable"
{| class="wikitable"
Line 213: Line 212:
| accessdate = {{date|2014-08-30|mdy}}
| accessdate = {{date|2014-08-30|mdy}}
| website = laracon.eu
| website = laracon.eu
}}</ref> || [[Amsterdam]]
}}</ref> || Amsterdam
|-
| August 11&ndash;12, 2015<ref name="2015con" /> || [[Kentucky]]
|-
|-
| August 25&ndash;26, 2015<ref name="2015con" /> || [[Amsterdam]]
|-
|}
|}



Revision as of 23:22, 8 July 2015

Laravel
Developer(s)Taylor Otwell
Initial releaseJune 2011; 13 years ago (2011-06)[1]
Stable release
5.1.3[2] / June 24, 2015; 9 years ago (2015-06-24)
Repository
Written inPHP 5[a]
Operating systemCross-platform
TypeWeb application framework
LicenseMIT License
Websitelaravel.com

Laravel is a free, open-source PHP web application framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern. Prominent Laravel features include its expressive syntax, a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, and various utilities that aid in application deployment and maintenance.[4][5][6]

According to a March 2015 developers survey on PHP frameworks popularity, Laravel was listed as the most popular PHP framework of 2015, followed by Symfony2, Nette, CodeIgniter, Yii2 and others.[7] As of August 2014, Laravel is the most popular and watched PHP project on GitHub.[8]

Laravel is released under the MIT License, with its source code hosted on GitHub.[9]

History

Laravel was created by Taylor Otwell as a more feature-rich alternative to the CodeIgniter framework, which did not provide various advanced features such as 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 includes built-in support for authentication, localisation, models, views, sessions, routing and other mechanisms, but lacks support for controllers that prevents 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 include the support for controllers, which made Laravel 2 a fully MVC-compliant framework, built-in support for the inversion of control (IoC) principle, and the so-called "Blade" templating system. 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 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". A significant increase of the 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 allowed much better extendibility of Laravel 4, 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]

Laravel 5 was released in February 2015 as a result of significant changes that ended up in renumbering the then-future Laravel 4.3 release. Beside bringing various new features and improvements to already existing ones, Laravel 5 also introduced a new internal directory tree structure for developed applications. 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.[10]

Laravel 5.1, released in June 2015, is the first release of Laravel to receive long-term support (LTS), with planned availability of bug fixes for two years and security patches for three years. LTS releases of Laravel are planned to be released every two years.[11]

Features

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

  • 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.[13]
  • 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.[14][15]
  • 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. It also allows selectable caching of the results of executed queries.[16]
  • Application logic is an integral part of developed applications, implemented either by using controllers or as part of the route declarations. Syntax used for definitions 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.[17][18]
  • 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, the deployment and updating of applications is significantly simplified.[19]
  • 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.[19]
  • 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.[20]

Ready-to-use bundles provided by Laravel through Composer and Packagist include the following:[3]

  • Cashier, introduced in Laravel 4.2, provides an interface for managing subscription billing services provided by Stripe, such as handling coupons and generating invoices.
  • SSH, introduced in Laravel 4.1, allows programmatic execution of CLI commands on remote servers using the Secure Shell (SSH) as an encrypted network protocol.
  • Scheduler, introduced in Laravel 5.0, is an addition to the Artisan that allows programmatic scheduling of periodically executed tasks. Internally, Scheduler relies on the cron daemon to run a single Artisan job that, in turn, executes the configured tasks.
  • Flysystem, introduced in Laravel 5.0, is a file system abstraction layer that allows local file systems and cloud-based storage services provided by Amazon S3 and Rackspace Cloud to be used transparently and in the same way.
  • Socialite, introduced in Laravel 5.0 as an optional package, provides simplified mechanisms for authentication with different OAuth providers, including Facebook, Twitter, Google, GitHub and Bitbucket.

Artisan CLI

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 in Laravel 4.[21]

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.[21]

Conferences

Laracon is a conference centered around the Laravel framework, covering its development, various uses, and related general software development practices. Laracons are organized primarily by UserScape with additional help provided by various sponsors;[22] as of August 2014, the following Laracons have been held:[23]

Date Location
February 22–23, 2013 Washington, D.C.
August 30–31, 2013[24] Amsterdam
May 15–16, 2014 New York City
August 28–30, 2014[25] Amsterdam

See also

Notes

  1. ^ PHP version 5.3.7 or newer is required for Laravel versions 4.1 and older, Laravel 4.2 and 5.0 require at least PHP 5.4, while Laravel 5.1 requires PHP 5.5.9 or newer.[3]

References

  1. ^ a b c d e Maks Surguy (July 27, 2013). "History of Laravel PHP framework, Eloquence emerging". maxoffsky.com. Retrieved May 10, 2015.
  2. ^ "laravel/framework: Release v5.1.3". github.com. June 24, 2015. Retrieved June 30, 2015.
  3. ^ a b "Laravel documentation (version 5.1): Release notes". laravel.com. Retrieved June 14, 2015.
  4. ^ a b "Laravel Documentation (versions 3.0–3.2.14)". three.laravel.com. Retrieved August 30, 2014.
  5. ^ a b "Laravel Documentation (version 4.2)". laravel.com. Retrieved August 30, 2014.
  6. ^ a b Daniel Gafitescu (June 6, 2013). "Goodbye CodeIgniter, Hello Laravel". sitepoint.com. Retrieved December 21, 2013.
  7. ^ Bruno Skvorc (March 28, 2015). "Best PHP Framework for 2015 – SitePoint Survey Results". sitepoint.com. Retrieved June 14, 2015.
  8. ^ "Most popular and watched PHP projects". github.com. Retrieved August 30, 2014.
  9. ^ "laravel/laravel: laravel/readme.md at master". github.com. April 22, 2015. Retrieved May 10, 2015.
  10. ^ Eric Barnes (January 30, 2015). "Laravel 5". laravel-news.com. Retrieved May 10, 2015.
  11. ^ Eric L. Barnes (June 9, 2015). "Laravel 5.1 is released". laravel-news.com. Retrieved June 14, 2015.
  12. ^ Jeffrey Way (November 28, 2012). "Why Laravel is Taking the PHP Community by Storm". code.tutsplus.com. Retrieved May 9, 2015.
  13. ^ "Laravel documentation (version 4.2): Package development". laravel.com. Retrieved August 30, 2014.
  14. ^ "Eloquent ORM in Laravel: What and Why!". enukesoftware.com. Retrieved December 19, 2014.
  15. ^ "Develop Faster with the Laravel PHP Framework". developer.com. Retrieved April 17, 2015.
  16. ^ "Laravel documentation (version 4.0): Query builder". laravel.com. Retrieved April 27, 2015.
  17. ^ "Laravel documentation (version 5.1): Blade Templates". laravel.com. Retrieved June 10, 2015.
  18. ^ Dayle Rees (2014). "Laravel Blade engine". daylerees.com. Retrieved June 10, 2015.
  19. ^ a b "Laravel documentation (version 5.0): Migrations and seeding". laravel.com. Retrieved April 27, 2015.
  20. ^ Manmeet Anand. "Creating a Contact Form in Laravel 5 Using the Form Request Feature!". tisindia.com. Retrieved March 2, 2015.
  21. ^ a b Jason Lewis (February 28, 2013). "Your One-Stop Guide to Laravel Commands". code.tutsplus.com. Retrieved May 9, 2015.
  22. ^ "Userscape home page". userscape.com. Retrieved January 2, 2014.
  23. ^ "Laravel documentation: Laracon". laravel.io. Retrieved January 2, 2014.
  24. ^ "Laracon EU 2013". laracon.eu. Retrieved January 2, 2014.
  25. ^ "Laracon EU 2014". laracon.eu. Retrieved August 30, 2014.