Skip to content

Commit 4531e48

Browse files
author
wangsai
committed
sync with english docs
1 parent 6d6a572 commit 4531e48

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

cn/quick.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Laravel框架使用 [Composer](http://getcomposer.org) 执行安装和依赖管
2121
<a name="permissions"></a>
2222
### 写入权限
2323

24-
安装完 Laravel ,你还需要为web服务器设置 `app/storage` 目录的写入权限。请参考 [安装](/docs/artisan) 一节以获取更多关于配置方面的信息。
24+
安装完 Laravel ,你还需要为web服务器设置 `app/storage` 目录的写入权限。请参考 [安装](/docs/installation) 一节以获取更多关于配置方面的信息。
2525

2626
<a name="directories"></a>
2727
### 目录结构

cn/requests.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ If you would like to set a cookie before a response has been created, use the `C
159159
**获取 $_SERVER 数组里指定的值**
160160

161161
$value = Request::server('PATH_INFO');
162+
163+
**判断请求是否是通过 HTTPS 连接发送过来的**
164+
165+
if (Request::secure())
166+
{
167+
//
168+
}
162169

163170
**判断是否是使用ajax请求**
164171

@@ -167,9 +174,9 @@ If you would like to set a cookie before a response has been created, use the `C
167174
//
168175
}
169176

170-
**判断请求是否使用https连接**
177+
**检测是否是任何可能的 JSON 类型的请求**
171178

172-
if (Request::secure())
179+
if (Request::ajax() or Request::isJson() or Request::wantsJson())
173180
{
174181
//
175-
}
182+
}

quick.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you prefer, you can alternatively download a copy of the [Laravel repository
2323
<a name="permissions"></a>
2424
### Permissions
2525

26-
After installing Laravel, you may need to grant the web server write permissions to the `app/storage` directories. See the [Installation](/docs/artisan) documentation for more details on configuration.
26+
After installing Laravel, you may need to grant the web server write permissions to the `app/storage` directories. See the [Installation](/docs/installation) documentation for more details on configuration.
2727

2828
<a name="directories"></a>
2929
### Directory Structure

requests.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ The `Request` class provides many methods for examining the HTTP request for you
167167
**Retrieving Values From $_SERVER**
168168

169169
$value = Request::server('PATH_INFO');
170+
171+
**Determining If The Request Is Over HTTPS**
172+
173+
if (Request::secure())
174+
{
175+
//
176+
}
170177

171178
**Determine If The Request Is Using AJAX**
172179

@@ -175,9 +182,9 @@ The `Request` class provides many methods for examining the HTTP request for you
175182
//
176183
}
177184

178-
**Determining If The Request Is Over HTTPS**
185+
**Detect any type of JSON request**
179186

180-
if (Request::secure())
187+
if (Request::ajax() or Request::isJson() or Request::wantsJson())
181188
{
182189
//
183190
}

0 commit comments

Comments
 (0)