Laravel 5.6 中文文档->fridays() ->at('17:00') ->onOneServer(); 动态频率限制 当我们在之前版本的路由群组中指定了频率限制后,必须要硬编码最大请求次数: 本文档由 Laravel 学院提供 Laravel 学院致力于提供优质 Laravel 中文学习资源:http://laravelacademy return $user->id === $order->user_id; } } API 控制器生成 声明被 API 消费的资源控制器时,通常你会排除输出 HTML 模板的路由,例如 create 和 edit,要生成不包含这些方法的资源控制器,可以在使 用 Artisan 命令执行 make:controller 时使用 --api 开关: php artisan make:controller } } 资源 original 属性 资源响应的 original 属性现在被设置为原始模型而不是 JSON 字符串/数组。这样在测试中就可以更好地检查响应的模型。 路由 返回新创建的模型 从路由中直接返回新创建的 Eloquent 模型时,响应状态码由 200 调整为 201,如果应用的任意相应测试显式期望 200 状态码,那么需要将它们修改 为 201。 信任代理0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档($response->allowed()) { // 用户被授权可以访问航班... } if ($response->denied()) { echo $response->message(); } 此外,当在路由或控制器中使用 $this->authorize 或 者 Gate::authorize 方法时,这些自定义的消息会被自动返回给前 端。 任务中间件 任务中间件允许你封装自定义的队列任务异常业务逻辑,避免在任务 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 12 本地化 Lang::getFromJson 方法 队列重试限制 重发邮箱验证路由 Input 门面 预计升级时间:1 个小时 注:本文档适用于是从 Laravel 5.8 升级到 6.0,我们将 尽可能在文档中列出所有重大更新。 PHP 7.2 影响级别:中等 protected $keyType = 'string'; 邮箱验证 重新发送验证路由 HTTP 方法 影响级别:中等 为了免除潜在的 CSRF 攻击,使用 Laravel 内置邮箱验证功能通过 路由器注册的 email/resend 路由请求方法已经由 GET 更新 为 POST。因此,你需要更新前端发送请求到该路由的请求类型。例 如,如果你是用的是内置的邮箱验证模板代码,需要像这样调整请求0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.2 中文文档该命令会生成纯文本的、兼容 Bootstrap 样式的视图用于登录、注册和密码重置。该命令 还会使用相应路由更新路由文件。 注意:该功能特性只能在新应用中使用,不能再应用升级过程中使用。 隐式模型绑定 隐式模型绑定使得在路由或控制器中直接注入相应模型实例更加便捷。假设你有一个路由 定义如下: 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 中,你需要通过 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 上有关于此特性的免费视频教程。 或者 CSS 框架。关于如何进行现代 Laravel 前端开发,请查看对应文档。 路由文件 默认情况下,新安装的 Laravel 5.3 应用在新的顶级目录 routes 下包含两个 HTTP 路由文件。web 和 api 路由文件在如何分割 Web 界面和 API 路由方面提供了指导。api 路由文件中的路由会通 过 RouteServiceProvider 自动添加 api 前缀和 auth:api0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.1 中文文档le)) { // 跳转... } return $next($request); } } 中间件参数可以再定义路由时通过:分隔中间件名称和参数名称来指定,多个参数可以通过 逗号进行分隔: 本文档由 Laravel 学院(LaravelAcademy.org)提供 3 Route::put('post/{id}' 'remember_token' => str_random(10), ]; }); 更多关于模型工厂的内容,请查看模型工厂一节。 Artisan 优化 Artisan 命令可以通过使用一个简单的,类似路由风格的“签名”(提供了一个非常简单的接口 来定义命令行参数和选项)来定义: /** * 命令行的名称和签名. * * @var string */ 本文档由 Laravel 学院(LaravelAcademy league/flysystem-aws-s3-v3 ~1.0 废弃 以下 Laravel 特性已经被废弃并且会在 2015 年 12 月份的 Laravel 5.2 中被完全移除: 中间件中的路由过滤器 Illuminate\Contracts\Routing\Middleware,中间件中不再需要任何 contract, Illuminate\Contracts\Routing0 码力 | 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













