Laravel 5.2 中文文档
Homestead 虚拟机中为 MySQL 和 Postgres 数据库做好了配置,更方便的 是,Laravel 的 .env 还为连接 Homestead 数据库做好了配置。 想要通过本地的 Navicat 或 Sequel Pro 连接到 Homestead 上的 MySQL 或 Postgres 数据库,可以通过新建连接来实现,主机 IP 都是 127.0.0.1,对于 MySQL 而言,端口 类实例,该契约提供了一些有用的方法来生成响应。 视图 如果你需要控制响应状态和响应头,并且还需要返回一个视图作为响应内容,可以使 用 view 方法: return response()->view('hello', $data)->header('Content-Type', $type); 当然,如果你不需要传递自定义的 HTTP 状态码和头信息,只需要简单使用全局辅助函 数 view 即可。 JSON json ”号来引用嵌套视图,比如, 如果视图存放路径是 resources/views/admin/profile.php,那我们可以这样引用它: return view('admin.profile', $data); 判断视图是否存在 如果需要判断视图是否存在,可调用在不带参数的 view 之后使用 exists 方法,如果视图 在磁盘存在则返回 true: if (view()->exists('emails0 码力 | 377 页 | 4.56 MB | 1 年前3Laravel 5.0 Documentation
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 PodcastWasPurchased($podcast)); Of course, your event handler will receive the event object instead of a list of data: class ReportPodcastPurchase { public function handle(PodcastWasPurchased $event) { env environment file. If the application key is not set, your user sessions and other encrypted data will not be secure! Laravel needs almost no other configuration out of the box. You are free to get0 码力 | 242 页 | 1.44 MB | 1 年前3Laravel 5.1 中文文档
默认已经在 homestead 中为 MySQL 和 Postgres 数据库做好了配置,更加方便的是,Laravel 的 local 数据库配置已经为使用数据库做好了设置。 想要通过本地的 Navicat 或 Sequel Pro 连接上 MySQL 或 Postgres 数据库,可以通过新建 连接来实现,主机 IP 都是 127.0.0.1,对于 MySQL 而言,端口号是 33060,对 Postgres 44 2.1 视图响应 如果你需要控制响应状态和响应头,还需要返回一个视图作为响应内容,可以使用 view 方 法: return response()->view('hello', $data)->header('Content-Type', $type); 当然,如果你不需要传递一个自定义的 HTTP 状态码或者自定义头,只需要简单使用全局 的帮助函数 view 即可。 2 ”号来引用嵌套视图,比如,如 果视图存放路径是 resources/views/admin/profile.php,那我们可以这样引用它: return view('admin.profile', $data); 判断视图是否存在 如果需要判断视图是否存在,可调用不带参数的 view 之后再使用 exists 方法,如果视图在 磁盘存在则返回 true: if (view()->exists('emails0 码力 | 307 页 | 3.46 MB | 1 年前3Laravel 5.3 中文文档
single job... php artisan queue:work --once 事件数据修改 多个队列任务事件如 JobProcessing 和 JobProcessed 将不再包含$data 属性,你需要更新应用调 用$event->job->payload()来获取对应数据。 失败任务表 如果你的应用有了 failed_jobs 表,需要添加 exception 字段到这张表,exception Homestead 默认已经在虚拟机中为 MySQL 和 Postgres 数据库做好了配置,更方便的是,这些 配置值就是 Laravel 的 .env 中默认提供的。 想要通过本地的 Navicat 或 Sequel Pro 连接到 Homestead 上的 MySQL 或 Postgres 数据库, 可以通过新建连接来实现,主机 IP 都是 127.0.0.1,对于 MySQL 而言,端口号是 dev 在终端 ping 一下任意*.dev 域名,如果 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=10 码力 | 691 页 | 9.37 MB | 1 年前3Laravel 5.6 中文文档
Homestead 默认已经在虚拟机中为 MySQL 和 Postgres 数据库做好了配置,更方便的是,这些配置值与 Laravel 的 .env 中默认提供的配置一致。 想要通过本地的 Navicat 或 Sequel Pro 连接到 Homestead 上的 MySQL 或 Postgres 数据库,可以通过新建连接来实现,主机 IP 都是 127.0.0.1,对于 MySQL 而言,端口号是 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 状态码和头信息,只需要简单使用全局辅助函数 view0 码力 | 377 页 | 14.56 MB | 1 年前3Laravel 6.0 中文文档
Homestead 默认已经在虚拟机中为 MySQL 和 Postgres 数据库 做好了配置,更方便的是,这些配置值与 Laravel 的 .env 中默认提 供的配置一致。 想要通过本地的 Navicat 或 Sequel Pro 连接到 Homestead 上的 MySQL 或 Postgres 数据库,可以通过新建连接来实现,主机 IP 都是 127.0.0.1,对于 MySQL 而言,端口号是 响应,文件下载、流响应等等。 视图响应 如果你需要控制响应状态和响应头,并且还需要返回一个视图作为响 应内容,可以使用 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 年前3CakePHP Cookbook 2.x
Tutorial - Adding a layer Create a Post Model Create a Posts Controller Creating Post Views Adding Posts Data Validation Editing Posts Deleting Posts Routes Conclusion Additional Reading Installation Requirements Understanding Models More on models Associations: Linking Models Together Retrieving Your Data Saving Your Data Deleting Data Data Validation Callback Methods Behaviors DataSources Model Attributes Additional Methods & configuration Setting ini directives Creating a custom session handler Reading & writing session data Exceptions Exception configuration Exception classes Built-in Exceptions for CakePHP Using HTTP0 码力 | 1096 页 | 958.62 KB | 1 年前3CakePHP Cookbook Documentation 5.x
Deprecations 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 年前3CakePHP 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 年前3CakePHP Cookbook 2.x
something like this: $ chown -R www-data app/tmp If for some reason CakePHP can’t write to that directory, you’ll see warnings and uncaught exceptions that cache data cannot be written. 4 https://git-scm your code using “routes” covered later on. The single instruction in the action uses set() to pass data from the controller to the view (which we’ll create next). The line sets the view variable called Getting Started CakePHP Cookbook Documentation, Release 2.x Creating Post Views Now that we have our data flowing to our model, and our application logic and flow defined by our controller, let’s create a0 码力 | 820 页 | 2.52 MB | 1 年前3
共 80 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8