Learning Laravel98 Chapter 28: Form Request(s) 99 Introduction 99 Syntax 99 Remarks 99 Examples 99 Creating Requests 99 Using Form Request 99 Handling Redirects after Validation 100 Chapter 29: Getting started How to do that? 146 Remove the public from url 146 Chapter 50: Requests 147 Examples 147 Getting input 147 Chapter 51: Requests 148 Examples 148 Obtain an Instance of HTTP Request 148 Request Middelware is a mechanism for filtering HTTP requests. They can be used to interact with requests before they reach the controllers and can thus modify or reject requests. Artisan Artisan is the command line0 码力 | 216 页 | 1.58 MB | 1 年前3
 Laravel 5.0 Documentation
v. RESTful Resource Controllers vi. Dependency Injection & Controllers vii. Route Caching iv. Requests i. Obtaining A Request Instance ii. Retrieving Input iii. Old Input iv. Cookies v. Files vi can be quickly changed using the new app:name Artisan command. Controllers, middleware, and requests (a new type of class in Laravel 5.0) are now grouped under the app/Http directory, as they are consistent interface to replace all types of filters, allowing you to easily inspect, and even reject, requests before they enter your application. For more information on middleware, check out the documentation0 码力 | 242 页 | 1.44 MB | 1 年前3
 Laravel 3.2 Documentation................................................................................ 49 Examining Requests ............................................................................................... .................................................................................... 121 Pull Requests ............................................................................................... Sometimes you may want to attach a filter to all requests that begin with a given URI. For example, you may want to attach the "auth" filter to all requests with URIs that begin with "admin". Here's how0 码力 | 139 页 | 1.13 MB | 1 年前3
 The Laravel Handbook
URL is handled in the routes/web.php file, which contains the router dedicated to handling HTTP requests coming from the browser. In this file, as shown in the screenshot, we tell Laravel to return the not just that file. We have api.php , channels.php and console.php . web.php handles HTTP requests from web browsers api.php handles API endpoints. We use it to create an API that can be used0 码力 | 111 页 | 14.25 MB | 1 年前3
 Laravel 5.2 中文文档ring 即 可。 贡献代码 1、缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 GitHub 的 pull requests,而 不是仅仅报告缺陷,“缺陷报告”也可以通过一个包含失败测试的 pull requests 的方式提 交。 然而,如果你以文件的方式提交缺陷报告,你的问题应该包含一个标题和对该问题的明确 说明,还要包含尽可能多的相关信息以及论证该问题的代码样板,缺陷报告的目的是为了 定义请求类,要创建表单验证类,可以使用 Artisan 命令 make:request: php artisan make:request StoreBlogPostRequest 生成的类位于 app/Http/Requests 目录下,接下来我们添加少许验证规则到 rules 方法: /** * 获取应用到请求的验证规则 * * @return array */ public function authorize(){ return true; } 自定义错误格式 如果你想要自定义验证失败时一次性存储到 session 中验证错误信息的格式,重写请求基 类(App\Http\Requests\Request)中的 formatErrors 方法即可。不要忘记在文件顶部导 入 Illuminate\Contracts\Validation\Validator 类: /** *0 码力 | 377 页 | 4.56 MB | 1 年前3
 Laravel 5.1 中文文档array_fetch 帮助函数被废弃, 使用 array_pluck 贡献代码 缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 GitHub 的 pull requests,而不是 仅仅报告缺陷,“缺陷报告”也可以通过一个包含失败测试的 pull request 的方式提交。 然而,如果你以文件的方式提交缺陷报告,你的问题应该包含一个标题和对该问题的明确说 明 义请求类,要创建表单验证类,可以使用 Artisan 命令 make:request: php artisan make:request StoreBlogPostRequest 生成的类位于 app/Http/Requests 目录下,接下来我们添加少许验证规则到 rules 方法: /** * 获取应用到请求的验证规则 * * @return array */ public function return true; } 3.2.2 自定义一次性错误格式 如果你想要自定义验证失败时一次性存储到 session 中验证错误信息的格式,重写请求基类 (App\Http\Requests\Request)中的 formatErrors 方法即可。不要忘记在文件顶部导入 Illuminate\Contracts\Validation\Validator 类: /** *0 码力 | 307 页 | 3.46 MB | 1 年前3
 Laravel 5.3 中文文档]); 1.3 贡献代码 1、缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 GitHub 的 pull requests,而不是仅仅 报告缺陷,“缺陷报告”也可以通过一个包含失败测试的 pull requests 的方式提交。 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel Laravel 学院致力于提供优质 Laravel 中文学习资源 170 php artisan make:request StoreBlogPost 生成的类位于 app/Http/Requests 目录下,接下来我们添加少许验证规则到 rules 方法: /** * 获取应用到请求的验证规则 * * @return array */ public function authorize(){ return true; } 自定义错误格式 如果你想要自定义验证失败时一次性存储到 session 中验证错误信息的格式,重写请求基类 (App\Http\Requests\Request)中的 formatErrors 方法即可。不要忘记在文件顶部导入 Illuminate\Contracts\Validation\Validator 类: /** *0 码力 | 691 页 | 9.37 MB | 1 年前3
 Laravel 6.0 中文文档anjun.com 25 贡献指南 缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 GitHub 的 pull requests,而不是仅仅报告缺陷,「缺陷报告」也可以通过 一个包含失败测试的 pull requests 的方式提交。 然而,如果你以文件的方式提交缺陷报告,你的问题应该包含一个标 题和对该问题的明确说明,还要包含尽可能多的相关信息以及论证该 (function () { Route::get('/user', function () { // }); }); 超出访问次数后,会返回 429 状态码并提示「Too many requests」。 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 195 动态频率限制 此外,还可以基于 User 模型的属性来动态设置最大请求次数。例如, 是包含验证逻辑的自定义请求类,要创建表单验证类,可以使用 Artisan 命令 make:request: php artisan make:request StoreBlogPost 生成的类位于 app/Http/Requests 目录下,如果该目录不存在,运 行 make:request 命令时会替我们生成。接下来我们添加少许验证规 则到该类的 rules 方法: /** * 获取应用到请求的验证规则 *0 码力 | 1442 页 | 14.66 MB | 1 年前3
 Laravel 5.6 中文文档Route::get('/user', function () { // }); }); 超出访问次数后,会返回 429 状态码并提示”Too many requests”。 动态频率限制 此外,还可以基于 User 模型的属性来动态设置最大请求次数。例如,如果 User 模型包含 rate_limit 属性,就可以将其这个属性名传递 到 throttle 表单验证类,可以使用 Artisan 命 令 make:request: php artisan make:request StoreBlogPost 生成的类位于 app/Http/Requests 目录下,如果该目录不存在,运行 make:request 命令时会替我们生成。接下来我们添加少许验证规则到该类 的 rules 方法: /** * 获取应用到请求的验证规则 *0 码力 | 377 页 | 14.56 MB | 1 年前3
共 9 条
- 1
 













