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 vi. Push Queues vii. Failed Jobs xix. Session i. Configuration ii. Session Usage iii. Flash Data iv. Database Sessions v. Session Drivers xx. Templates i. Blade Templating ii. Other Blade Control 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. Changing0 码力 | 242 页 | 1.44 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' Bootstrap 4。 升级指南 预计升级时间:10-30 分钟 PHP Laravel 5.6 需要 PHP 7.1.3 或更高版本。 更新依赖 在 composer.json 中更新 laravel/framework 依赖到 5.6.*,更新 fideloper/proxy 依赖到 ~4.0。 此外,如果你使用下以下官方扩展包,也要升级它们到最新版本: Dusk optimize 命令 之前版本中废弃的 optimize 命令已经被彻底移除。由于 PHP 自身的性能优化,optimize 命令已经不能给应用提供显著的性能提升,所以,你需 要从 composer.json 文件的 scripts 部分移除 php artisan optimize。 Blade 本文档由 Laravel 学院提供 Laravel 学院致力于提供优质 Laravel0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档2 影响级别:中等 由于 PHP 7.1 从 2019 年 12 月开始不再主动维护,所以 Laravel 6.0 要求 PHP 版本大于等于 7.2。 更新依赖 在 composer.json 文件中更新 laravel/framework 依赖到 ^6.0。 当然,不要忘了检查应用所使用的第三方扩展包是否支持 Laravel 6.0,如果需要升级的话也要更新。 授权 授权资源 不过,如果你没有使用 Homestead 的话,那么就需要确认自己的 环境满足以下要求: PHP >= 7.2.0 PHP BCMath 扩展 PHP Ctype 扩展 PHP JSON 扩展 PHP Mbstring 扩展 PHP OpenSSL 扩展 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com Laravel 中文学习资源:https://xueyuanjun.com 94 如果你是通过 Composer 在指定 Laravel 项目中安装的 Homestead,需要确保 composer.json 中包含 了 "laravel/homestead": "^9" 然后更新这个依赖: composer update 然后,需要通过 vagrant box update 命令更新 Vagrant0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.1 中文文档文件,编辑文件 内容如下: *!.gitignore 该目录应该是可写的,用来存储临时优化文件如 compiled.php,routes.php,config.php 以及 service.json 新增 BroadcastServiceProvider 在配置文件 config/app.php 中,添加 Illuminate\Broadcasting\BroadcastServiceProvider getDateFormat 方法来修改,现 在依然可以这么做;但是为了更加方便可以在模型中简单通过指定$dateFormat 属性来替代 重写方法。 在序列化模型到数组或 JSON 时日期格式也被应用到,当从 Laravel 5.0 迁移到 5.1 时,这 将会改变 JSON 序列化的日期字段的格式。想要在序列化模型中设置指定的日期格式,你 可以在模型中重写 serializeDate(DateTime $date)方法,这样就可以在不改变字段存储格 response()->view('hello', $data)->header('Content-Type', $type); 当然,如果你不需要传递一个自定义的 HTTP 状态码或者自定义头,只需要简单使用全局 的帮助函数 view 即可。 2.2 JSON 响应 json 方法会自动将 Content-Type 头设置为 application/json,并使用 PHP 函数 json_encode 方法将给定数组转化为0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.3 中文文档> 如果你不想使用 Vue 组件,欢迎提供你自己的用于管理客户端和访问令牌的前端后台。Passport 提供了一个简单的 JSON API,你可以在前端使用任何 JavaScript 框架与之集成。 当然,Passport 还让定义可能在应用消费你的 API 期间被请求的访问令牌域变得简单: Passport::tokensCan([ 有关于本特性的免费视频教程。 Laravel 5.3 提供了一个更加现代的前端架构。这主要会影响 make:auth 命令生成的认证脚手架。 不再从 CDN 中加载前端资源,所有依赖都被定义在默认的 package.json 文件中。 此外,支持单文件的 Vue 组件现在已经开箱支持, resources/assets/js/components 目录下包含 了一个简单的示例组件 Example.vue ,新的 single job... php artisan queue:work --once 事件数据修改 多个队列任务事件如 JobProcessing 和 JobProcessed 将不再包含$data 属性,你需要更新应用调 用$event->job->payload()来获取对应数据。 失败任务表 如果你的应用有了 failed_jobs 表,需要添加 exception 字段到这张表,exception0 码力 | 691 页 | 9.37 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 lo', $data)->header('Content-Type', $type); 当然,如果你不需要传递自定义的 HTTP 状态码和头信息,只需要简单使用全局辅助函 数 view 即可。 JSON json 方法会自动将 Content-Type 头设置为 application/json,并使用 PHP 函 数 json_encode 方法将给定数组转化为 JSON: return0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 3.2 Documentation.................................................................................... 30 Binding Data To Views ........................................................................................ ..................................................................... 34 Redirecting With Flash Data......................................................................................... 36 Downloads ............................................................................................ 37 JSON Input ...........................................................................................0 码力 | 139 页 | 1.13 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 Database Seeding 60 Examples 60 Running a Seeder 60 Creating a Seed 60 Inserting Data using a Seeder 60 Inserting data with a Model Factory 61 Seeding with MySQL Dump 61 Using faker And ModelFactories 157 Examples 157 Inserting data 157 Using the DB Facade 157 Via Instantiating a Model 157 Using the create method 157 Using factory 158 Seeding && deleting old data and reseting auto-increment 1580 码力 | 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": "我是內容", 筆記連結:https://hackmd.io/ZDoduP_oQ5WXYsO7TyJsiQ 新建單⼀資源 POST https://localhost/api/v1/articles { "data": { "id": 1, "title": "我是標題⽂字", "content": "我是內容", "created_at":0 码力 | 22 页 | 3.41 MB | 1 年前3
The Laravel Handbook
anything other than HTML. 18 But you can do lots of interesting stuff in Blade templates: insert data, add conditionals, do loops, display something if the user is authenticated or not, or show different Blade (for more I highly recommend the official Blade guide). In the route definition, you can pass data to a Blade template: Route::get('/test', function () { return view('test', ['name' => 'Flavio']); 'Flavio']); }); and use it like this:{{ $name }}
The {{ }} syntax allows you to add any data to the template, escaped. Inside it you can also run any PHP function you like, and Blade will display0 码力 | 111 页 | 14.25 MB | 1 年前3
共 18 条
- 1
- 2













