Laravel 5.6 中文文档一、序言 新版特性 Laravel 5.6 在 Laravel 5.5 的基础上继续进行优化,包括日志系统、单机任务调度、模型序列化优化、动态频率限制、广播频道类、API 资源控制器 生成、Eloquent 日期格式化优化、Blade 组件别名、Argon2 密码哈希支持、引入 Collision 扩展包等等等等。此外,所有的前端脚手架代码都已升 级到 Bootstrap 4,Laravel 缓存驱动作为应用默认缓存驱动。此外,所有服务器必须和同一个中心缓存服务器进行通 信。 如果你的应用运行在多个服务器上,现在可以限定只在一台机器上运行调度任务。例如,假设你有一个在每周五晚上生成新报告的调度任务,如果任 务调度器运行在三个服务器上,这个调度任务就会在三台机器上运行并生成同样的报告三次,这样很不优雅,甚至很糟糕! 要指定任务只在一台机器上运行,可以在定义调度任务时使用 onOneServer 方法,第一台获取到任务的机器会给这个任务上一把原子级别的锁来阻 ->fridays() ->at('17:00') ->onOneServer(); 动态频率限制 当我们在之前版本的路由群组中指定了频率限制后,必须要硬编码最大请求次数: 本文档由 Laravel 学院提供 Laravel 学院致力于提供优质 Laravel 中文学习资源:http://laravelacademy0 码力 | 377 页 | 14.56 MB | 1 年前3
 Laravel 6.0 中文文档($response->allowed()) { // 用户被授权可以访问航班... } if ($response->denied()) { echo $response->message(); } 此外,当在路由或控制器中使用 $this->authorize 或 者 Gate::authorize 方法时,这些自定义的消息会被自动返回给前 端。 任务中间件 任务中间件允许你封装自定义的队列任务异常业务逻辑,避免在任务 Laravel 功能强大的集合方法了,在 Laravel 6.0 中新引入了一个 LazyCollection 类来对 Collection 类进行 补充,LazyCollection 底层基于 PHP 的生成器实现,适用于处理 大型数据集。 例如,假设你的应用需要处理 GB 级别的日志文件,并使用 Laravel 的集合方法来解析日志,这个时候将整个日志文件一次性读取到内存 显然是不合适的,这个 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 12  本地化 Lang::getFromJson 方法  队列重试限制  重发邮箱验证路由  Input 门面 预计升级时间:1 个小时 注:本文档适用于是从 Laravel 5.8 升级到 6.0,我们将 尽可能在文档中列出所有重大更新。 PHP 7.2 影响级别:中等0 码力 | 1442 页 | 14.66 MB | 1 年前3
 Laravel 5.2 中文文档php artisan make:auth 该命令会生成纯文本的、兼容 Bootstrap 样式的视图用于登录、注册和密码重置。该命令 还会使用相应路由更新路由文件。 注意:该功能特性只能在新应用中使用,不能再应用升级过程中使用。 隐式模型绑定 隐式模型绑定使得在路由或控制器中直接注入相应模型实例更加便捷。假设你有一个路由 定义如下: 本文档由 Laravel 学院(LaravelAcademy 中,你需要通过 Route::model 方法告诉 Laravel 注入 App\User 实例以匹 配路由定义中的 {user} 参数。 现在,在 Laravel 5.2 中,框架将会基于相应 URI 片段自动注入模型,从而允许你快速 访问需要的模型实例。 如果路由参数片段 {user} 匹配路由闭包或控制器方法中相应变量 $user,并且被类型声明 为一个 Eloquent 模型类的话,Laravel 将会自动注入该模型。 更多隐式模型绑定详情请查看 Laravel 5.2 文档 HTTP 路由模型绑定部分。 中间件组 中间件组允许你通过单个方便的键来对相关路由中间件进行分组,从而为某个路由一次指 定多个中间件。例如,在同一个应用中构建 Web UI 或 API 时这一特性很有用,你可以 将 session 和 csrf 路由分组到一个 web 组,或者将访问频率限制分组到 api 中。 实际上,默认的0 码力 | 377 页 | 4.56 MB | 1 年前3
 Laravel 5.3 中文文档........................................................................................ 100 5.1 路由 .................................................................................................. Passport 实现无痛的 OAuth2 服务器;通过 Laravel Scout 实现全文模型搜索;在 Laravel Elixir 中支持 Webpack;“可邮寄”的对象;明确分离 web 和 api 路由;基于闭包的控制台命令;存储上传文件的辅助函数;支持 POPO 和单动作控制 器;以及优化前端脚手架;等等等等。 通知(Notifications) 注:Laracasts 上有关于此特性的免费视频教程。 Laravel 中文学习资源 11 前端架构 注:Laracasts 有关于本特性的免费视频教程。 Laravel 5.3 提供了一个更加现代的前端架构。这主要会影响 make:auth 命令生成的认证脚手架。 不再从 CDN 中加载前端资源,所有依赖都被定义在默认的 package.json 文件中。 此外,支持单文件的 Vue 组件现在已经开箱支持, resources/assets/js/components0 码力 | 691 页 | 9.37 MB | 1 年前3
 Laravel 5.1 中文文档提供的最大跨度的支持,并且将会持续为更多的企业用户及普通用户提 供稳定平滑的支持。 PSR-2 PSR-2 代码风格指南已经被 Laravel 框架采取为默认风格指南,此外,所有代码生成器已经 被更新到生成兼容 PSR-2 语法的代码。 文档 Laravel 文档的每一个页面都进行了一丝不苟的审查和引人注目的优化,所有代码示例都被 审查并且扩展到更好的支持上下文相关性。 本文档由 le)) { // 跳转... } return $next($request); } } 中间件参数可以再定义路由时通过:分隔中间件名称和参数名称来指定,多个参数可以通过 逗号进行分隔: 本文档由 Laravel 学院(LaravelAcademy.org)提供 3 Route::put('post/{id}' 现在可以通过使用模型工厂附带一种简单的方式类创建 Eloquent 模型存根,模型工 厂允许你为 Eloquent 模型定义一系列默认属性,然后为测试或数据库填充生成模型实例。 模型工厂还可以利用强大的 PHP 扩展库 Faker 类生成随机的属性数据。 $factory->define('App\User', function ($faker) { return [0 码力 | 307 页 | 3.46 MB | 1 年前3
 Laravel 3.2 Documentation............................................................................................ 52 URL Helpers .......................................................................................... passing of strings into the Input::except method.  Fixed replacement of optional parameters in URL::transpose method.  Improved update handling on Has_Many and Has_One relationships.  Improved performance by only loading contents from file once.  Fix handling of URLs beginning with hashes in URL::to .  Fix the resolution of unset Eloquent attributes.  Allows pivot table timestamps to be0 码力 | 139 页 | 1.13 MB | 1 年前3
 Learning Laravelbeanstalkd 145 null 145 Chapter 49: Remove public from URL in laravel 146 Introduction 146 Examples 146 How to do that? 146 Remove the public from url 146 Chapter 50: Requests 147 Examples 147 Getting Controller method 152 A route for multiple verbs 152 Route Groups 153 Named Route 153 Generate URL using named route 153 Route Parameters 154 Optional Parameter 154 Required Parameter 154 Accessing laravel gives .env-example file that you can use as a reference. That's it. Now when you visit the url which you configured as the domain with your server, your laravel app should work just as it worked0 码力 | 216 页 | 1.58 MB | 1 年前3
 Laravel 5.0 Documentation
getPageLinkWrapper signature has changed to add the rel argument: abstract public function getPageLinkWrapper($url, $page, $rel = null); If you are using the Iron.io queue driver, you will need to add a new encrypt your app/lang/en/reminders.php language file to match this updated file. For security reasons, URL domains may no longer be used to detect your application environment. These values are easily spoofable using the url helper: HTTP Routing Basic Routing Basic GET Route Other Basic Routes Route Registering A Route For Multiple Verbs Registering A Route That Responds To Any HTTP Verb $url = url('foo');0 码力 | 242 页 | 1.44 MB | 1 年前3
 The Laravel Handbook
9 For example in this portion of the file you can see we set the app name, the debug flag, the URL, settings related to logging, to the database connection, email sending and much more. One very useful Laravel application: 12 We made a request to the / relative URL ( http://127.0.0.1:8000/ ), which means the “home page”. This URL is handled in the routes/web.php file, which contains the router shown in the screenshot, we tell Laravel to return the welcome view when someone visits the / URL using the GET HTTP method (the one used when you open the page in the browser): Route::get('/'0 码力 | 111 页 | 14.25 MB | 1 年前3
 《Slides Dev Web》02. Introduction aux frameworks PHP
Front Controller – Traitement et dispatch des requêtes grâce aux routes – (bootstrap, ré-écriture des URL, …) • Object Relational Mapping5 – Active Record, Table Data Gateway, Data Mapper, … • UI Patterns6 Configuration • Keep It Simple and Stupid • 12 factor app7 - fr8 Pretty ( | smart | clean | formatted) URL • Les URL doivent être explicites : – Manipulées par l’utilisateur – Utilisées pour le référencement routage (routing) – Le Front Controller recoit toutes les requêtes (URL rewriting) – Il les dispatche vers les contrôleurs Smart URL & SEO Autres Services • Migrations : Evolutions de la strucutre de0 码力 | 24 页 | 1.03 MB | 1 年前3
共 16 条
- 1
 - 2
 













