-
*/ protected $headers = Request::HEADER_X_FORWARDED_ALL; } 注:如果你在使用 AWS Elastic Load Balancing,headers 值应该修改为 Request::HEADER_X_FORWARDED_AWS_ELB,关于 headers 属性可用的更多 常量,请查看 Symfony 信任代理文档。 App\Book::all(); if ($someCondition) { $books->load('author', 'publisher'); } 如果你需要设置更多的查询条件到渴求式加载查询上,可以传递一个包含你想要记载的关联关系数组到 load 方法,数组的值应该是接收查询实例的 闭包: $books->load(['author' => function ($query) { $ 你还可以在路由或控制器中构造资源类实例时添加顶层数据,在所有资源类中都有效的 additional 方法,可用于添加数组数据到资源响应: return (new UserCollection(User::all()->load('roles'))) ->additional(['meta' => [ 'key' => 'value',
0 码力 |
377 页 |
14.56 MB
| 1 年前 3
-
com 269 */ protected $headers = Request::HEADER_X_FORWARDED_A LL; } 注:如果你在使用 AWS Elastic Load Balancing, headers 值应该修改 为 Request::HEADER_X_FORWARDED_AWS_ELB,关 于 headers 属性可用的更多常量,请查看 Symfony 信 想要了解更多,查看 Symfony 进度条组件文档。 注册命令 由于 Console Kernel 的 commands 方法会调用 load 方法,所 有 app/Console/Commands 目录下的命令都会通过 Artisan 自动注 册。实际上,你可以额外调用 load 方法来遍历其他目录下的 Artisan 命令: 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资 the application. * * @return void */ protected function commands() { $this->load(__DIR__.'/Commands'); $this->load(__DIR__.'/MoreCommands'); // ... } 此外,还可以在 app/Console/Kernel.php 类的 $commands
0 码力 |
1442 页 |
14.66 MB
| 1 年前 3
-
contain the logic to load the blog posts so that all you have to do i load the view and it's all ready for you. This keeps you from having to make sure that your controllers load the a bunch of data from 'admin'), ); Notice the new handles option in our bundle configuration array? This tells Laravel to load the Admin bundle on any requests where the URI begins with "admin". Now you're ready to register think of the application folder as the special default bundle with which Laravel is pre-programmed to load and use. 41 Creating Bundles The first step in creating a bundle is to create a folder
0 码力 |
139 页 |
1.13 MB
| 1 年前 3
-
either the values that are consistent across all of your environments, or set them to use env() to load values that vary by environment. Remember, if you add more keys to .env file, add sample values can run the composer update function to update your core application files! If you receive class load errors, try running the update command with the --no-scripts option enabled like so: composer comes after the App\Http\Controllers namespace "root". By default, the RouteServiceProvider will load the routes.php file within a route group containing the root controller namespace. If you choose
0 码力 |
242 页 |
1.44 MB
| 1 年前 3
-
change, focus, blur • Document – ready, load, resize, scroll, unload • Exemple $("p").click(function(){ // code à éxecuter ici }); AJAX5 • $(selector).load(URL, data, callback) – URL : Ressource – callback : fonction de rappel avec 3 paramètres : 5https://www.w3schools.com/jquery/jquery_ajax_load.asp 4 ∗ responseTxt ∗ statusTxt ∗ xhr • $.get(URL, callback) • $.post(URL, data, callback) Effets
0 码力 |
5 页 |
49.45 KB
| 1 年前 3
-
contexte11 XHR en jQuery avec load()