Laravel 5.3 中文文档........................................................................................ 386 10. 数据库 ................................................................................................. ...................................................................................... 439 10.5 填充数据 .................................................................................................. ........................................................................................ 552 13.3 数据库 .................................................................................................0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档Laravel 6.0(LTS 版本) 在 Laravel 5.8 的基础上继续进行优化, 包括引入语义化版本、兼容 Laravel Vapor、优化授权响应、支持任 务中间件、新增懒集合、优化数据库子查询、将前端脚手架提取到独 立的 Composer 包 laravel/ui、以及多个 bug 修复和可用性的提 升。 语义化版本 Laravel 框架包 laravel/framework 提供了对 Laravel Vapor 的兼容,这是一个针对 Laravel 应用的自动扩容无服务器部署平台。Vapor 对在 AWS Lambda 上 管理 Laravel 应用以及与 SQS 队列、数据库、Redis 集群、网络、 CloudFront CDN 进行交互的复杂性进行了抽象。 通过 Ignition 优化异常 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习 Laravel 6.0 中新引入了一个 LazyCollection 类来对 Collection 类进行 补充,LazyCollection 底层基于 PHP 的生成器实现,适用于处理 大型数据集。 例如,假设你的应用需要处理 GB 级别的日志文件,并使用 Laravel 的集合方法来解析日志,这个时候将整个日志文件一次性读取到内存 显然是不合适的,这个时候懒集合类就派上用场了,它可以每次只读0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.6 中文文档org 3 Eloquent 日期转化 现在你可以单独自定义 Eloquent 日期字段转化格式了,开始之前,需要在转化声明中指定目标日期格式。指定好之后,该格式就会在模型序列化为 数组/JSON 时使用: protected $casts = [ 'birthday' => 'date:Y-m-d', 'joined_at' => 'datetime:Y-m-d H:00' Laravel 5.6 引入了两个新的方法来生成 UUID:Str::uuid 和 Str::orderedUuid,orderedUuid 方法会生成一个时间戳最靠前的 UUID,通过诸如 MySQL 的数据库来索引,更简单,也更高效。两个方法都会返回 Ramsey\Uuid\Uuid 对象: use Illuminate\Support\Str; return (string) Str::uuid(); Bootstrap 4。 升级指南 预计升级时间:10-30 分钟 PHP Laravel 5.6 需要 PHP 7.1.3 或更高版本。 更新依赖 在 composer.json 中更新 laravel/framework 依赖到 5.6.*,更新 fideloper/proxy 依赖到 ~4.0。 此外,如果你使用下以下官方扩展包,也要升级它们到最新版本: Dusk0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.2 中文文档升级指南 从 5.1 升级到 5.2.0 更新依赖 更新 composer.json 文件指向 laravel/framework 5.2.*。 注:如果你安装的是 Laravel 5.2 的 beta 版本,还要添加 "minimum-stability": "beta" 到 composer.json 文件。 添加 symfony/dom-crawler ~3.0 和 symfony/css-selector symfony/css-selector ~3.0 到 composer.json 的 require-dev 部分。 认证 配置文件 更新 config/auth.php 文件内容如下: https://github.com/laravel/laravel/blob/develop/config/auth.php 更新完成后,基于原来的配置设置认证选项,如果不做改动,认证服务将基于 Laravel 如果你之前在路由或控制器中类型提示了模型实例,并且希望注入一个空的模型实例,那 么现在应该移除这个类型提示然后在路由或控制器中直接创建一个新的模型实例;否则, Laravel 将会基于路由 URI 的标识符试图从数据库获取一个已存在的模型实例。 IronMQ IronMQ 队列驱动被移动到自己的扩展包中,不再被框架核心支持: http://github.com/LaravelCollective/iron-queue0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.1 中文文档Laravel 学院(LaravelAcademy.org)提供 2 事件广播 在很多现代的 web 应用中,web 套接字被用于实现实时的,即时更新的用户接口,当服务 器上的某些数据更新后,通常一条消息将会通过 websocket 连接发送到客户端并进行处理。 为了帮助你构建这样类型的应用,Laravel 使得通过 websocket 连接广播事件变得简单可行。 广播 Laravel 现在可以通过使用模型工厂附带一种简单的方式类创建 Eloquent 模型存根,模型工 厂允许你为 Eloquent 模型定义一系列默认属性,然后为测试或数据库填充生成模型实例。 模型工厂还可以利用强大的 PHP 扩展库 Faker 类生成随机的属性数据。 $factory->define('App\User', function ($faker) { return [ 文件,编辑文件 内容如下: *!.gitignore 该目录应该是可写的,用来存储临时优化文件如 compiled.php,routes.php,config.php 以及 service.json 新增 BroadcastServiceProvider 在配置文件 config/app.php 中,添加 Illuminate\Broadcasting\BroadcastServiceProvider0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.0 Documentation
xvii. Pagination i. Configuration ii. Usage iii. Appending To Pagination Links iv. Converting To JSON xviii. Queues i. Configuration ii. Basic Usage iii. Queueing Closures iv. Running The Queue Listener Mutators xviii. Attribute Casting xix. Model Events xx. Model Observers xxi. Converting To Arrays / JSON iv. Schema Builder i. Introduction ii. Creating & Dropping Tables iii. Adding Columns iv. Changing automatically be issued, and the error messages will be either flashed to the session or converted to JSON. Form validation has never been more simple. For more information on FormRequest validation, check0 码力 | 242 页 | 1.44 MB | 1 年前3
《Slides Dev Web》 06. HTTP & AJAX
“GETorPOST” 8Bux Rémy • Dans responseXML Réponse en JSON17 • Standard18 depuis octobre 2013 (Douglas Crockford19) • Tableau d’objets js : – pour chacun, tableau d’objets • Solution : le parser21 JSON var users = JSON.parse(myXHR.responseText); var myString = JSON.stringify(users); • Avec jQuery : 17https://www.json.org/ 18https://ecma-international.org com/2010/04/19/how-evil-is-eval/ 21https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/JSON/parse 9 var obj = jQuery.parseJSON('{"nom":"Berger"}'); alert(obj.nom); Fetch API • Le successeur0 码力 | 11 页 | 91.09 KB | 1 年前3
Laravel 3.2 Documentation............................................................................................ 37 JSON Input ........................................................................................... authentication system. Added Input::json() method for working with applications using Backbone.js or similar. Added Response::json method for creating JSON responses. Added Response::eloquent Response::view('home', array('foo' => 'bar')); Returning a JSON response: return Response::json(array('name' => 'Batman')); 32 Returning Eloquent models as JSON: return Response::eloquent(User::find(1));0 码力 | 139 页 | 1.13 MB | 1 年前3
Learning LaravelSetup Initial Setup To use Stripe for handling payments we need to add the following to the composer.json then run composer update: "laravel/cashier": "~6.0" The following line then needs to be added practice to create this file inside app/config/ folder. You can also add constants.php file in compose.json file. Example File: app/config/constants.php Array based constants inside the file: return [ provider is called twice. • An alternative way is registering the helpers file from the composer.json file. You can copy the logic from the laravel framework itself. • Examples document.php0 码力 | 216 页 | 1.58 MB | 1 年前3
使⽤Laravel 8
PHP主流框架打造
RESTful APIhttps://localhost/api/v1/articles/1 HTTP STATUS : 200 OK HTTP 協定 HTTP VERBS. URL. HTTP STATUS. JSON. POST { "data": { "id": 1, "title": "我是標題⽂字", "content": "我是內容" les Headers Headers Body Body REQUEST RESPONSE JSON Accept : application/json Content-Type : application/json Content-Type : application/json { "title": "我是標題⽂字", "content": "我是內容",0 码力 | 22 页 | 3.41 MB | 1 年前3
共 15 条
- 1
- 2













