跳转到内容

Laravel

维基百科,自由的百科全书

这是本页的一个历史版本,由G0110280留言 | 贡献2018年2月2日 (五) 04:03 (通过翻译页面“Laravel”创建)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
Laravel
Laravel logo
開發者Taylor Otwell
首次发布2011年6月,​13年前​(2011-06[1]
当前版本5.5.0[2](2017年8月30日,​7年前​(2017-08-30
源代码库 編輯維基數據鏈接
编程语言PHP 7[a]
操作系统Cross-platform
类型Web framework
许可协议MIT License
网站laravel.com

Laravel 是一个 免费的開源[4] PHP 网框架,建立由泰勒Otwell和旨在发展的网络应用程序下的 模型图控制 (视) 的建筑模式的。 一些功能的Laravel是一个模块化的 包装系统 有一个专门的依赖的经理,不同的方式用于访问 关系数据库、公用事业,帮助 应用程序的部署 和维持,其方向朝 语法糖.[5][6]:2,5–9[7][8]

截至2015年3月 (2015-03),Laravel被视为一个最受欢迎的 PHP 框架,一起 ,Zend, , Yii2 和其他人。:1[9]

源码 的Laravel托管在 审查 和授权下的条款, 麻省理工学院许可证的。引用错误:<ref>标签中未填内容的引用必须填写name属性

历史

泰勒Otwell创建Laravel作为一个试图提供一种更先进的替代笨框架,该框架没有提供某些功能,如支持用户 的认证授权的。 Laravel的第一个 测试版 物提供关于六月9日,2011年,随后通过的Laravel 1释放后在同一个月。 Laravel 1包含内在的支持身份验证, 本地化的、 模型, 风景, 会议、路由和其他机制,但缺乏支持 控制 ,阻止它成为一个真正的 的框架。引用错误:<ref>标签中未填内容的引用必须填写name属性

Laravel 2释放在2011年九月,使各种改进,从提交人和社区。 主要的新特点包括支持控制,其做Laravel 2个完全视符合标准的框架内支持 反转的控制 (国际奥委会)的原则和一个 模板的系统 ,称为 刀刃上。 作为一个缺点,支持第三方 软件包 是除去Laravel 2.引用错误:<ref>标签中未填内容的引用必须填写name属性

Laravel 3释放在2012年与一套新的功能,包括 命令线接口 (CLI)命名的 来说,建立在支持多个 数据库管理系统、数据库迁移作为一种形式的 版本控制 对数据库的布局,支助处理 活动,和包装的系统,称为 捆绑的。 增加的Laravel的用户群和普及排放Laravel 3.引用错误:<ref>标签中未填内容的引用必须填写name属性

Laravel 4,代号为 照亮,是释放在可2013年。 它是作为一个完全重写Laravel框架、其布局的迁移成为一套单独的软件包的分布式通过 作曲家,作为一个 应用程序级别的软件包经理. 这种布局改善该扩展性的Laravel 4,搭配其官方定期发布计划横跨六个月之间的轻微的 点释放的。 其他新的特点在Laravel 4释放包括 种数据库 对最初的人口数据库,支持 消息队,建立支持发送不同类型的电子邮件,并支持延迟删除的数据库记录的所谓的 软删除的。[10]:18–19

Laravel 5释放在2015年二月结果的内部变化,结束了在重新编号后的未来Laravel 4.3释放。 新的特点在Laravel 5释放包括支持调度周期性地执行任务通过一个包裹叫 调度程序,一个抽象层称为 Flysystem ,允许远程存储可用于相同方式作为本地 文件系统,提高处理的包装的资产,通过 灵丹妙药,并简化的外部处理身份验证通过可选择的 社交名媛 包。 Laravel 5还引入了一个新的内部 目录树 的结构对于开发的应用程序。:13–14[11]

Laravel 5.1,发布在2015年六月,是第一个版本的Laravel收到 的长期支持 (它的),与计划提供的 错误修正 两年和 安全补丁的 三年。 它发布的Laravel计划被释放,每两年一次。引用错误:<ref>标签中未填内容的引用必须填写name属性

Laravel 5.3,发布于八月23,2016年。 新的特点在5.3是侧重于提高开发速度通过添加额外的框改进对共同任务。引用错误:<ref>标签中未填内容的引用必须填写name属性 引用错误:<ref>标签中未填内容的引用必须填写name属性

Laravel5.4,发表在一月24,2017年。 这释放了许多新的功能,像Laravel黄昏,Laravel混合,叶片组件和时隙,降价的电子邮件自动外墙、路线进行改进、更高了信息的集合,和其他许多人。引用错误:<ref>标签中未填内容的引用必须填写name属性

Laravel5.5,发布于八月30日2017年。

释放的历史

对于它的版本,例如Laravel5.1,修正是提供了2年和安全的修订提供了3年。 这些版本提供最长窗口的支助和维护。 对于一般的发布、修正提供6个月与安全修复,提供1年。引用错误:<ref>标签中未填内容的引用必须填写name属性

版本 释放日期 注意到
舊版本,不再支援: 1.0 2011年六月 NA
舊版本,不再支援: 2.0 2011年九月 NA
舊版本,不再支援: 3.0 二月22日,2012年 NA
舊版本,不再支援: 3.1 三月27日2012年 NA
舊版本,不再支援: 3.2 月22日2012年 NA
舊版本,不再支援: 4.0 月28日2013年 NA
舊版本,不再支援: 4.1 十二月11日,2013年 NA
舊版本,不再支援: 4.2 六月1日至2014年 NA
舊版本,不再支援: 5.0 二月4日2015 NA
舊版本,仍被支援: 5.1 LTS 六月9日2015 NA
舊版本,不再支援: 5.2 十二月21日2015 NA
舊版本,不再支援: 5.3 八月23,2016 NA
舊版本,仍被支援: 5.4 月24,2017 NA
當前版本: 5.5 LTS 八月30日2017 NA
未来版本: 5.6 二月份,2018 NA
图例: 舊版本 舊版本,仍被支援 当前版本 最新预览版本 未来版本

資料來源:GitHub[12]

功能

以下特点作为Laravel的关键设计要点(其中未具体指出的,说明参阅功能的Laravel 3)::5–9[13]

  • 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.[14]
  • 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.[15][16]
  • 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.[17]
  • 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.[18][19]
  • 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.[20]
  • 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,: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.[21]
  • 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.[22]
  1. ^ Maks Surguy. History of Laravel PHP framework, Eloquence emerging. maxoffsky.com. July 27, 2013 [May 10, 2015]. 
  2. ^ laravel/framework: Release v5.5.0. github.com. August 30, 2017 [August 30, 2017]. 
  3. ^ Laravel documentation (version 5.3): Release notes. laravel.com. [August 29, 2015]. 
  4. ^ The real-time community site Voten goes open-source. 
  5. ^ Daniel Gafitescu. Goodbye CodeIgniter, Hello Laravel. June 6, 2013 [December 21, 2013].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  6. ^ Martin Bean. Laravel 5 Essentials. books.google.com (Packt). April 2015 [September 2, 2015]. ISBN 978-1785283017. 
  7. ^ Laravel Documentation (versions 3.0–3.2.14). three.laravel.com. [August 30, 2014]. 
  8. ^ Laravel Documentation (version 4.2). laravel.com. [August 30, 2014]. 
  9. ^ Bruno Skvorc. Best PHP Framework for 2015 – SitePoint Survey Results. March 28, 2015 [June 14, 2015].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  10. ^ Raphaël Saunier. Getting Started with Laravel 4. worldcat.org (Packt). January 2014 [September 2, 2015]. ISBN 978-1783287031. 
  11. ^ Eric Barnes. Laravel 5. January 30, 2015 [May 10, 2015].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  12. ^ Github: Laravel. Laravel. [February 26, 2017]. 
  13. ^ Jeffrey Way. Why Laravel is Taking the PHP Community by Storm. November 28, 2012 [May 9, 2015].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  14. ^ Laravel documentation (version 4.2): Package development. [August 30, 2014]. 
  15. ^ Eloquent ORM in Laravel: What and Why!. [December 19, 2014]. 
  16. ^ Develop Faster with the Laravel PHP Framework. [April 17, 2015]. 
  17. ^ Laravel documentation (version 4.0): Query builder. [April 27, 2015]. 
  18. ^ Dayle Rees. Laravel documentation (version 5.1): Blade Templates. 2014 [June 10, 2015]. 
  19. ^ Dayle Rees. Laravel Blade engine. 2014 [June 10, 2015].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  20. ^ Laravel documentation (version 5.0): Migrations and seeding. [April 27, 2015]. 
  21. ^ Manmeet Anand. Creating a Contact Form in Laravel 5 Using the Form Request Feature!. [March 2, 2015].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  22. ^

特色的包

准备使用的束提供Laravel通过作曲家和Packagist包括如下:引用错误:<ref>标签中未填内容的引用必须填写name属性

  • 收银员介绍了在Laravel 4.2,提供接口供管理的订阅费提供的服务 ,如处理 优惠券 而生成 的。
  • SSH,介绍了在Laravel 4.1,允许方案执行的 CLI 命令远程服务器上使用了 安全外壳 (SSH)作为一个加密 网络的协议的。
  • 调度程序,介绍了在Laravel 5.0,是一种外来说命令行程序,允许方案调度的周期性地执行任务。 在内部,调度依赖于 计划任务 的守护程序运行一个工匠的工作,反过来,执行配置的任务。
  • Flysystem,介绍了在Laravel 5.0,是一个 文件系统 的抽象层,允许地方文件系统和 基于储存服务的提供由 亚马逊S3 和 机架空云 要使用透明和以同样的方式。
  • 社交名媛,介绍了在Laravel 5.0作为一个可选的软件包,提供了简化的机制认证与不同的 护身份验证 的供应商,包括 Facebook, Twitter, 谷歌上, 审查健康的。:13

而言CLI

Laravel的 命令线接口 (CLI),称作 来说,是最初引入Laravel 3的一组有限的能力。 Laravel的后迁移到一个作曲家-基础结构允许而言,纳入不同的组成从 框架,导致在提供额外的来说特Laravel 4.:73–83[1]

功能来说是映射到不同的子命令的 Artisan 命令行程序提供的功能,艾滋病在管理和建设Laravel为基础的应用程序。 共同使用的来说包括管理数据库迁移和种子,发布包资产,以及产生的 代码 ,用于新的控制器和迁移;后者释放的开发者创造适当的代码 骷髅了。 该功能和能力的来说也可以扩大,通过实施新的定义令,其中,例如,可以使用的自动化应用程序的具体经常性任务。:73–83

服务器的要求

该Laravel框架中有一些系统的要求。 当然,所有这些要求被满足过的Laravel家虚拟机,因此强烈建议您使用的家园为您当地Laravel发展的环境。

然而,如果不使用的家园,你会需要确保你的服务器是否满足以下要求:

  •PHP>=7.0.0
 •OpenSSL PHP Extension
 •公设辩护人PHP Extension
 •Mbstring PHP Extension
 •分析器PHP Extension
 •XML PHP Extension

会议

Laracon 是官方Laravel会议围绕Laravel框架,涵盖其发展、使用和有关的一般性 软件开发 的主题。 Laracon已经发生在 美国,以 欧洲 和网络在过去。[2][3] 通常,会议发生在 美国欧洲 的每一年。 2017年的第一年一Laracon举行作为一个在线的事件只。 正如三月2017年,有计划为更多的Laracons举行的在线的未来。[4] 每年的会议具有各种不同的赞助者和组织者,但Laravel,Laravel新闻和UserScape通常是主要组织者。 截至2017年3月 (2017-03),下列Laracons已经举行或宣布:

泰勒Otwell在2013年我们Laracon
日期 位置
二月22–23日,2013年 华盛顿特区
八月30–31日,2013年引用错误:<ref>标签中未填内容的引用必须填写name属性 阿姆斯特丹
可能15–16 2014年 纽约市
八月28–30 2014年引用错误:<ref>标签中未填内容的引用必须填写name属性 阿姆斯特丹
八月11–12日,2015年引用错误:<ref>标签中未填内容的引用必须填写name属性 肯塔基州路易斯维尔
八月25–26日,2015年引用错误:<ref>标签中未填内容的引用必须填写name属性 阿姆斯特丹
七月27–29,2016引用错误:<ref>标签中未填内容的引用必须填写name属性 肯塔基州路易斯维尔
八月23–24日2016年引用错误:<ref>标签中未填内容的引用必须填写name属性 阿姆斯特丹
8月,2017引用错误:<ref>标签中未填内容的引用必须填写name属性 在线
七月25日至26日,2017引用错误:<ref>标签中未填内容的引用必须填写name属性 纽约市
八月28日至30日,2017年引用错误:<ref>标签中未填内容的引用必须填写name属性引用错误:<ref>标签中未填内容的引用必须填写name属性 阿姆斯特丹

Laravel合作伙伴

在四月份的7,2017,泰勒Otwell宣布的伙伴段Laravel的网站。 其目的是提供Laravel社会的一个建议清单的可信公司提供最佳的Laravel发展和指导。引用错误:<ref>标签中未填内容的引用必须填写name属性 为的九月,2017年,目前的列表Laravel合作伙伴包括

  • Vehikl
  • 紧Co.
  • 的发展集团

也参看

注意到

参考文献

  1. ^ Jason Lewis. Your One-Stop Guide to Laravel Commands. February 28, 2013 [May 9, 2015].  |author=|last=只需其一 (帮助)|author=|last=只需其一 (帮助)
  2. ^ Laracon Online | The official worldwide Laravel online conference. [2017-03-24] (英语). 
  3. ^ Search Results. 2017-03-13 [2017-03-24] (英语). 
  4. ^ 截至2017年3月 (2017-03)


引用错误:页面中存在<ref group="lower-alpha">标签或{{efn}}模板,但没有找到相应的<references group="lower-alpha" />标签或{{notelist}}模板