Laravel 5.6 中文文档
'throttle:60,1')->group(function () { Route::get('/user', function () { // }); }); 在 Laravel 5.6 中,你可以基于认证用户模型属性指定一个动态的最大请求次数,如果 User 模型包含 rate_limit 属性,可以将属性名传递 给 throttle 中间件,以便用于计算最大请求次数计数: 中间件,以便用于计算最大请求次数计数: Route::middleware('auth:api', 'throttle:rate_limit,1')->group(function () { Route::get('/user', function () { // }); }); 广播频道类 如果你的应用消费多个不同的频道,routes/channels.php 文件可能会变得很臃 方法。join 方法中的代码等同于之前位于频道授权闭包中的处理逻辑。当然,你还可以使用频道模 型绑定: User; use App\Order; class OrderChannel { /** * Create a new channel instance. *0 码力 | 377 页 | 14.56 MB | 1 年前3Laravel 5.1 中文文档
*/ public function handle($request, Closure $next, $role) { if (! $request->user()->hasRole($role)) { // 跳转... } return $next($request); } Eloquent 模型定义一系列默认属性,然后为测试或数据库填充生成模型实例。 模型工厂还可以利用强大的 PHP 扩展库 Faker 类生成随机的属性数据。 $factory->define('App\User', function ($faker) { return [ 'name' => $faker->name, 'email' => $faker->email @var string */ 本文档由 Laravel 学院(LaravelAcademy.org)提供 4 protected $signature = 'email:send {user} {--force}'; 更多关于 Artisan 的内容,请查看命令行一节。 目录结构 为了更好地表达意图,app/Commands 目录被重命名为 app/Jobs,此外,app/Handlers0 码力 | 307 页 | 3.46 MB | 1 年前3Laravel 5.2 中文文档
中文学习资源 2 use App\User; Route::get('/user/{user}', function (User $user) { return $user; }); 在 Laravel 5.1 中,你需要通过 Route::model 方法告诉 Laravel 注入 App\User 实例以匹 配路由定义中的 {user} 参数。 现在,在 Laravel Laravel 5.2 中,框架将会基于相应 URI 片段自动注入模型,从而允许你快速 访问需要的模型实例。 如果路由参数片段 {user} 匹配路由闭包或控制器方法中相应变量 $user,并且被类型声明 为一个 Eloquent 模型类的话,Laravel 将会自动注入该模型。 更多隐式模型绑定详情请查看 Laravel 5.2 文档 HTTP 路由模型绑定部分。 中间件组 中间件组允许你 驱动,需要在配置文 件 session.php 中指定 legacy-database 驱动。 如果你想要使用新的驱动,还需要添加 user_id (nullable integer)、ip_address (nullable string) 以及 user_agent (text) 列到存放 Session 的数据表中。 Stringy 框架不再内置 Stringy 库,如果要在应用中使用,你需要通过0 码力 | 377 页 | 4.56 MB | 1 年前3Laravel 5.3 中文文档
Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 4 个通知,你可以使用一个很简单的来实现: $user->notify(new InvoicePaid($invoice)); Laravel 社区已经为通知系统编写了各种各样的驱动,包括对 iOS 和 Android 通知的支持,要学习 更多关于通知系统的细节,查看其相应文档。 Authenticate the channel subscription... */ Broadcast::channel('orders.*', function ($user, $orderId) { return $user->placedOrder($orderId); }); Laravel Echo,通过 NPM 安装的全新的 JavaScript 包,将和 Laravel here((users) => { // }) .joining((user) => { console.log(user.name); }) .leaving((user) => { console.log(user.name); }); 要学习更多关于 Echo 和事件广播的内容,请参考其对应文档。0 码力 | 691 页 | 9.37 MB | 1 年前3Laravel 6.0 中文文档
授权响应消息来轻松实现。例如,给定如下策略方法: /** * 判断用户是否可以查看指定的航班. * * @param \App\User $user * @param \App\Flight $flight * @return mixed */ public function view(User $user, Flight $flight) { return $this->deny('Explanation 模型实例,如果使用传 统的 Laravel 集合,所有 10000 个 Eloquent 模型会同时加载到内 存中: $users = App\User::all()->filter(function ($user) { return $user->id > 500; }); 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 回调只有在迭代完每个用户时才会执行,从 而极大减少内存的使用量: $users = App\User::cursor()->filter(function ($user) { return $user->id > 500; }); foreach ($users as $user) { echo $user->id; } Eloquent 子查询优化 Laravel 6.0 引入了多个数据库子查询优化和增强支持。例如,假设0 码力 | 1442 页 | 14.66 MB | 1 年前3Rust 程序设计语言 简体中文版 1.85.0
cargo run Compiling guessing_game v0.1.0 (file:///projects/guessing_game) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s Running `target/debug/guessing_game` Hello, world +++++++ warning: `guessing_game` (bin "guessing_game") generated 1 warning Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.59s Rust 警告我们没有使用 read_line 的返回值 Result,说明有一个可能的错误没有处理。 cargo run Compiling guessing_game v0.1.0 (file:///projects/guessing_game) Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.44s Running `target/debug/guessing_game` Guess the0 码力 | 562 页 | 3.23 MB | 10 天前3Blender v4.1 Manual
Getting Started About Blender Installing Blender Configuring Blender Help System Sections Sections User Interface Window System Keymap Interface Controls Tools & Operators Editors 3D Viewport Image Editor motion graphics, TV shows, concept art, story-boarding, commercials, and feature films. Check out the User Stories page on the Blender website for more examples. Key Features Blender is a fully integrated unfinished features and a non- standard way of providing the GUI, the enthusiastic support from the user community and customers who had purchased Blender Publisher in the past, meant that Ton could not0 码力 | 6263 页 | 303.71 MB | 1 年前3OpenShift Container Platform 4.10 可伸缩性和性能
ExecStart=/usr/sbin/setenforce 1 TimeoutSec=0 [Install] WantedBy=multi-user.target graphical.target enabled: true name: sync-var-lib-etcd-to-etcd.service /var/lib/etcd,强制恢复 SELinux 标签。 旧内容不会被删除。 3. 节点位于独立磁盘后,使用以下信息更新机器配置文件 etcd-mc.yml : WantedBy=multi-user.target graphical.target enabled: true name: restorecon-var-lib-etcd.service $ oc exec 命令查看这些配置集的内容: 4.4. 验证是否应用了 TUNED 配置集 验证应用到集群节点的 TuneD 配置集。 输 输出示例 出示例 NAME:配置集(Profile)对象的名称。每个节点有一个 Profile 对象,其名称相互匹配。 TUNED:要应用的 TuneD 配置集的名称。 APPLIED:如果 TuneD 守护进程应用了所需的配置集,则为 True。 (True/False/Unknown)。0 码力 | 315 页 | 3.19 MB | 1 年前3Weblate 4.2.2 用户文档
2020 年 09 月 02 日 User docs 1 User docs 1 1.1 Weblate basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Registration and user profile . . . . . . . . . . . . . . . . . . . . . . . 392 Python 模块索引 396 HTTP Routing Table 397 索引 399 ii CHAPTER1 User docs 1.1 Weblate basics 1.1.1 Project structure In Weblate translations are organized into projects still producing errors for seemingly inconsistent resulting translations. 1.2 Registration and user profile 1.2.1 注册 Everybody can browse projects, view translations or suggest translations by default0 码力 | 411 页 | 4.60 MB | 1 年前3Weblate 4.2.1 用户文档
2020 年 08 月 21 日 User docs 1 User docs 1 1.1 Weblate basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Registration and user profile . . . . . . . . . . . . . . . . . . . . . . . 392 Python 模块索引 396 HTTP Routing Table 397 索引 399 ii CHAPTER1 User docs 1.1 Weblate basics 1.1.1 Project structure In Weblate translations are organized into projects still producing errors for seemingly inconsistent resulting translations. 1.2 Registration and user profile 1.2.1 注册 Everybody can browse projects, view translations or suggest translations by default0 码力 | 411 页 | 4.60 MB | 1 年前3
共 700 条
- 1
- 2
- 3
- 4
- 5
- 6
- 70