CakePHP Cookbook Documentation 5.xDeprecations New Features PHPUnit 10 Upgrade phpunit.xml adjustments ->withConsecutive() has been removed data providers have to be static Tutorials & Examples Content Management Tutorial Getting CakePHP Checking Configure Writing Configuration data Reading Configuration Data Checking to see if Configuration Data is Defined Deleting Configuration Data Reading & Deleting Configuration Data Reading and writing configuration Parameters Request Body Data File Uploads PUT, PATCH or DELETE Data Environment Variables (from $_SERVER and $_ENV) XML or JSON Data Path Information Checking Request Conditions Session Data Host and Domain Name0 码力 | 1080 页 | 939.39 KB | 1 年前3
CakePHP Cookbook Documentation 5.x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 Clearing Cached Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 Using . . . . . . . . . . . . . . . . . . . . . 611 Automatically Choosing the Locale Based on Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Translate Content/Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 Processing Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 Setting0 码力 | 848 页 | 2.53 MB | 1 年前3
CakePHP Cookbook 3.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 Clearing Cached Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 Using . . . . . . . . . . . . . . . . . . . . . 740 Automatically Choosing the Locale Based on Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . 741 22 Logging 743 Logging Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753 Processing Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754 Getting0 码力 | 967 页 | 2.80 MB | 1 年前3
CakePHP Cookbook 4.x
Configure Writing Configuration data Reading Configuration Data Checking to see if Configuration Data is Defined Deleting Configuration Data Reading & Deleting Configuration Data Reading and writing configuration Parameters Request Body Data File Uploads PUT, PATCH or DELETE Data Environment Variables (from $_SERVER and $_ENV) XML or JSON Data Path Information Checking Request Conditions Session Data Host and Domain Name Information Database Basics Query Builder Table Objects Entities Retrieving Data & Results Sets Validating Data Saving Data Deleting Data Associations - Linking Tables Together Behaviors Schema System Schema0 码力 | 1249 页 | 1.04 MB | 1 年前3
CakePHP Cookbook 4.x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Clearing Cached Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 Using . . . . . . . . . . . . . . . . . . . . . 719 Automatically Choosing the Locale Based on Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . 721 Translate Content/Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 Processing Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 Setting0 码力 | 967 页 | 2.88 MB | 1 年前3
CakePHP Cookbook 3.x
Class Writing Configuration data Reading Configuration Data Checking to see if Configuration Data is Defined Deleting Configuration Data Reading & Deleting Configuration Data Reading and writing configuration Parameters Request Body Data File Uploads PUT, PATCH or DELETE Data Environment Variables (from $_SERVER and $_ENV) XML or JSON Data Path Information Checking Request Conditions Session Data Host and Domain Name Information Database Basics Query Builder Table Objects Entities Retrieving Data & Results Sets Validating Data Saving Data Deleting Data Associations - Linking Tables Together Behaviors Schema System Schema0 码力 | 1244 页 | 1.05 MB | 1 年前3
Learning LaravelChecking for Existence 21 Raw echos 21 Including Partial Views 21 Layout Inheritance 22 Sharing data to all views 24 Using View::share 24 Using View::composer 24 Closure-based composer 24 Class-based Contains to check if a collection satisfies certain condition 32 Using Pluck to extract certain values from a collection 32 Using Map to manipulate each element in a collection 33 Using sum, avg, min min or max on a collection for statistical calculations 33 Sorting a collection 33 Sort() 33 SortBy() 34 SortByDesc() 35 Using reduce() 35 Using macro() to extend collections 36 Using Array Syntax0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.6 中文文档test 在终端 ping 一下任意 *.test 域名,如果 Valet 安装正确就会看到来自 127.0.0.1 的响 应: PING foobar.dev (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.069 ms 64 bytes from 127.0.0.1: icmp_seq=1 视图响应 如果你需要控制响应状态和响应头,并且还需要返回一个视图作为响应内容,可以使用 view 方法: return response() ->view('hello', $data, 200) ->header('Content-Type', $type); 当然,如果你不需要传递自定义的 HTTP 状态码和头信息,只需要简单使用全局辅助函数 view : @include('view.name', ['some' => 'data']) 当然,如果你尝试包含一个不存在的视图,Laravel 会抛出错误,如果你想要包含一个有可能不存在的视图,可以使用 @includeIf 指令: @includeIf('view.name', ['some' => 'data']) 如果包含的视图取决于一个给定的布尔条件,可以使用 @includeWhen0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档RateLimited]; } 懒集合 许多开发者已经使用过 Laravel 功能强大的集合方法了,在 Laravel 6.0 中新引入了一个 LazyCollection 类来对 Collection 类进行 补充,LazyCollection 底层基于 PHP 的生成器实现,适用于处理 大型数据集。 例如,假设你的应用需要处理 GB 级别的日志文件,并使用 Laravel 的集 响应,文件下载、流响应等等。 视图响应 如果你需要控制响应状态和响应头,并且还需要返回一个视图作为响 应内容,可以使用 view 方法: return response() ->view('hello', $data, 200) ->header('Content-Type', $type); 当然,如果你不需要传递自定义的 HTTP 状态码和头信息,只需要 简单使用全局辅助函数 view 即可: R 样引用它: 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 286 return view('admin.profile', $data); 判断视图是否存在 如果需要判断视图是否存在,可调用 View 门面上的 exists 方法, 如果视图在磁盘存在则返回 true: use Illuminate\Support\Facades\View;0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.1 中文文档$columns); // ... return $model; } lists 方法 lists 方法现在返回一个 Collection 实例而不是包含 Eloquent 查询结果的数组,如果你想 将 Collection 转化为数组,使用 all 方法: User::lists('id')->all(); 注意:Query Builder 的 lists 返回的仍然是数组。 6 Collection 类 sortBy 方法 sortBy 方法现在返回一个新的 collection 实例而不是改变已有的 collection: $collection = $collection->sortBy('name'); groupBy 方法 groupBy 方法现在为每个父级 Collection 中的 item 返回 Collection 实例,如果你想要将这些 map 方法实现: $collection->groupBy('type')->map(function($item){ return $item->all(); }); lists 方法 lists 方法现在返回一个 Collection 实例而不是数组,如果你想要将 Collection 转化数组,使 用 all 方法: $collection->lists('id')->all();0 码力 | 307 页 | 3.46 MB | 1 年前3
共 80 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8













