Skip to content

Commit 021e0a6

Browse files
committed
同步了部分文件
1 parent 274e918 commit 021e0a6

File tree

8 files changed

+107
-51
lines changed

8 files changed

+107
-51
lines changed

cn/facades.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Facades(一种设计模式,通常翻译为外观模式)提供了一个"sta
114114

115115
下面你会找到所有的facade以及其包含的类。这是一个非常有用的工具,可以根据给定的facade快速定位到API文档。适用于[IoC 绑定](/docs/ioc) 的也同时给出了其key。
116116

117+
117118
Facade | Class | IoC Binding
118119
------------- | ------------- | -------------
119120
App | [Illuminate\Foundation\Application](http://laravel.com/api/4.2/Illuminate/Foundation/Application.html) | `app`
@@ -154,10 +155,9 @@ SSH | [Illuminate\Remote\RemoteManager](http://laravel.com/api/4.2/Illuminate/
154155
SSH (Instance) | [Illuminate\Remote\Connection](http://laravel.com/api/4.2/Illuminate/Remote/Connection.html) |
155156
URL | [Illuminate\Routing\UrlGenerator](http://laravel.com/api/4.2/Illuminate/Routing/UrlGenerator.html) | `url`
156157
Validator | [Illuminate\Validation\Factory](http://laravel.com/api/4.2/Illuminate/Validation/Factory.html) | `validator`
157-
Validator (Instance) | [Illuminate\Validation\Validator](http://laravel.com/api/4.2/Illuminate/Validation/Validator.html)
158+
Validator (Instance) | [Illuminate\Validation\Validator](http://laravel.com/api/4.2/Illuminate/Validation/Validator.html) |
158159
View | [Illuminate\View\Factory](http://laravel.com/api/4.2/Illuminate/View/Factory.html) | `view`
159160
View (Instance) | [Illuminate\View\View](http://laravel.com/api/4.2/Illuminate/View/View.html) |
160161

161162

162-
163163
译者:mpandar(马胜盼)

cn/homestead.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Laravel Homestead是一个官方的、预封装的Vagrant“箱子”,它提
1515

1616
Homestead能运行在所有的Windows、Mac和Linux上,它包含了Nginx、PHP 5.5、MySQL、Postgres、Redis、Memcached和你开发神奇的Laravel应用程序需要的所有其它软件。
1717

18+
Homestead is currently built and tested using Vagrant 1.6.
19+
1820
<a name="included-software"></a>
1921
## 包含的软件
2022

@@ -108,7 +110,7 @@ Homestead能运行在所有的Windows、Mac和Linux上,它包含了Nginx、PHP
108110
109111
### 添加额外站点
110112

111-
一旦你的Homestead环境被分配并运行,你可能想为Laravel应用程序添加额外的Nginx站点。在一个Homestead环境中,你可以按意愿运行尽可能多的Laravel应用程序。有两种方法可以做到这一点。首先,你可以简单的添加站点到“Homestead.yaml”文件里,先对箱子执行“vagrant destroy”命令,然后再执行“vagrant up”命令。
113+
一旦你的Homestead环境被分配并运行,你可能想为Laravel应用程序添加额外的Nginx站点。在一个Homestead环境中,你可以按意愿运行尽可能多的Laravel应用程序。有两种方法可以做到这一点。首先,你可以简单的添加站点到“Homestead.yaml”文件里,先对箱子执行“vagrant destroy”命令,然后再执行“vagrant provision”命令。
112114

113115
或者,你可以使用Homestead环境里的“serve”脚本。想使用“serve”脚本,先SSH到Homestead环境并运行下面的命令:
114116

cn/quick.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Laravel 快速入门
22

33
- [安装](#installation)
4+
- [本地开发环境](#local-development-environment)
45
- [路由](#routing)
56
- [创建视图](#creating-a-view)
67
- [创建迁移](#creating-a-migration)
78
- [Eloquent ORM](#eloquent-orm)
89
- [显示数据](#displaying-data)
10+
- [部署应用](#deploying-your-application)
911

1012
<a name="installation"></a>
1113
## 安装
@@ -42,6 +44,20 @@ Typically, you may use a web server such as Apache or Nginx to serve your Larave
4244

4345
After installing the framework, take a glance around the project to familiarize yourself with the directory structure. The `app` directory contains folders such as `views`, `controllers`, and `models`. Most of your application's code will reside somewhere in this directory. You may also wish to explore the `app/config` directory and the configuration options that are available to you.
4446

47+
<a name="local-development-environment"></a>
48+
## Local Development Environment
49+
50+
In the past, configuring a local PHP development environment on your machine was a headache. Installing the proper version of PHP, required extensions, and other needed components is time consuming and confusing. Instead, consider using [Laravel Homestead](/docs/homestead). Homestead is a simple virtual machine designed for Laravel and [Vagrant](http://vagrantup.com). Since the Homestead Vagrant box is pre-packaged with all of the software you need to build robust PHP applications, you can create a virtualized, isolated development environment in seconds. Here is a list of some of the goodies included with Homestead:
51+
52+
- Nginx
53+
- PHP 5.5
54+
- MySQL
55+
- Redis
56+
- Memcached
57+
- Beanstalk
58+
59+
Don't worry, even though "virtualized" sounds complicated, it's painless. VirtualBox and Vagrant, which are Homestead's two dependencies, both include simple, graphical installers for all popular operating systems. Check out the [Homestead documentation](/docs/homestead) to get started.
60+
4561
<a name="routing"></a>
4662
## Routing
4763

@@ -171,3 +187,10 @@ Now that we have made the `users` available to our view, we can display them lik
171187
You may be wondering where to find our `echo` statements. When using Blade, you may echo data by surrounding it with double curly braces. It's a cinch. Now, you should be able to hit the `/users` route and see the names of your users displayed in the response.
172188

173189
This is just the beginning. In this tutorial, you've seen the very basics of Laravel, but there are so many more exciting things to learn. Keep reading through the documentation and dig deeper into the powerful features available to you in [Eloquent](/docs/eloquent) and [Blade](/docs/templates). Or, maybe you're more interested in [Queues](/docs/queues) and [Unit Testing](/docs/testing). Then again, maybe you want to flex your architecture muscles with the [IoC Container](/docs/ioc). The choice is yours!
190+
191+
<a name="deploying-your-application"></a>
192+
## Deploying Your Application
193+
194+
One of Laravel's goals is to make PHP application development enjoyable from download to deploy, and [Laravel Forge](https://forge.laravel.com) provides a simple way to deploy your Laravel applications onto blazing fast servers. Forge can configure and provision servers on DigitalOcean, Linode, Rackspace, and Amazon EC2. Like Homestead, all of the latest goodes are included: Nginx, PHP 5.5, MySQL, Postgres, Redis, Memcached, and more. Forge "Quick Deploy" can even deploy your code for you each time you push changes out to Github or Bitbucket!
195+
196+
On top of that, Forge can help you configure queue workers, SSL, Cron jobs, sub-domains, and more. For more information, visit the [Forge website](https://forge.laravel.com).

facades.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ So, our `Cache::get` call could be re-written like so:
5858

5959
Creating a facade for your own application or package is simple. You only need 3 things:
6060

61-
- An IoC binding
61+
- An IoC binding.
6262
- A facade class.
6363
- A facade alias configuration.
6464

@@ -116,44 +116,44 @@ Below you will find every facade and its underlying class. This is a useful tool
116116

117117
Facade | Class | IoC Binding
118118
------------- | ------------- | -------------
119-
App | [Illuminate\Foundation\Application](http://laravel.com/api/4.1/Illuminate/Foundation/Application.html) | `app`
120-
Artisan | [Illuminate\Console\Application](http://laravel.com/api/4.1/Illuminate/Console/Application.html) | `artisan`
121-
Auth | [Illuminate\Auth\AuthManager](http://laravel.com/api/4.1/Illuminate/Auth/AuthManager.html) | `auth`
122-
Auth (Instance) | [Illuminate\Auth\Guard](http://laravel.com/api/4.1/Illuminate/Auth/Guard.html) |
123-
Blade | [Illuminate\View\Compilers\BladeCompiler](http://laravel.com/api/4.1/Illuminate/View/Compilers/BladeCompiler.html) | `blade.compiler`
124-
Cache | [Illuminate\Cache\Repository](http://laravel.com/api/4.1/Illuminate/Cache/Repository.html) | `cache`
125-
Config | [Illuminate\Config\Repository](http://laravel.com/api/4.1/Illuminate/Config/Repository.html) | `config`
126-
Cookie | [Illuminate\Cookie\CookieJar](http://laravel.com/api/4.1/Illuminate/Cookie/CookieJar.html) | `cookie`
127-
Crypt | [Illuminate\Encryption\Encrypter](http://laravel.com/api/4.1/Illuminate/Encryption/Encrypter.html) | `encrypter`
128-
DB | [Illuminate\Database\DatabaseManager](http://laravel.com/api/4.1/Illuminate/Database/DatabaseManager.html) | `db`
129-
DB (Instance) | [Illuminate\Database\Connection](http://laravel.com/api/4.1/Illuminate/Database/Connection.html) |
130-
Event | [Illuminate\Events\Dispatcher](http://laravel.com/api/4.1/Illuminate/Events/Dispatcher.html) | `events`
131-
File | [Illuminate\Filesystem\Filesystem](http://laravel.com/api/4.1/Illuminate/Filesystem/Filesystem.html) | `files`
132-
Form | [Illuminate\Html\FormBuilder](http://laravel.com/api/4.1/Illuminate/Html/FormBuilder.html) | `form`
133-
Hash | [Illuminate\Hashing\HasherInterface](http://laravel.com/api/4.1/Illuminate/Hashing/HasherInterface.html) | `hash`
134-
HTML | [Illuminate\Html\HtmlBuilder](http://laravel.com/api/4.1/Illuminate/Html/HtmlBuilder.html) | `html`
135-
Input | [Illuminate\Http\Request](http://laravel.com/api/4.1/Illuminate/Http/Request.html) | `request`
136-
Lang | [Illuminate\Translation\Translator](http://laravel.com/api/4.1/Illuminate/Translation/Translator.html) | `translator`
137-
Log | [Illuminate\Log\Writer](http://laravel.com/api/4.1/Illuminate/Log/Writer.html) | `log`
138-
Mail | [Illuminate\Mail\Mailer](http://laravel.com/api/4.1/Illuminate/Mail/Mailer.html) | `mailer`
139-
Paginator | [Illuminate\Pagination\Factory](http://laravel.com/api/4.1/Illuminate/Pagination/Factory.html) | `paginator`
140-
Paginator (Instance) | [Illuminate\Pagination\Paginator](http://laravel.com/api/4.1/Illuminate/Pagination/Paginator.html) |
141-
Password | [Illuminate\Auth\Reminders\PasswordBroker](http://laravel.com/api/4.1/Illuminate/Auth/Reminders/PasswordBroker.html) | `auth.reminder`
142-
Queue | [Illuminate\Queue\QueueManager](http://laravel.com/api/4.1/Illuminate/Queue/QueueManager.html) | `queue`
143-
Queue (Instance) | [Illuminate\Queue\QueueInterface](http://laravel.com/api/4.1/Illuminate/Queue/QueueInterface.html) |
144-
Queue (Base Class) | [Illuminate\Queue\Queue](http://laravel.com/api/4.1/Illuminate/Queue/Queue.html) |
145-
Redirect | [Illuminate\Routing\Redirector](http://laravel.com/api/4.1/Illuminate/Routing/Redirector.html) | `redirect`
146-
Redis | [Illuminate\Redis\Database](http://laravel.com/api/4.1/Illuminate/Redis/Database.html) | `redis`
147-
Request | [Illuminate\Http\Request](http://laravel.com/api/4.1/Illuminate/Http/Request.html) | `request`
148-
Response | [Illuminate\Support\Facades\Response](http://laravel.com/api/4.1/Illuminate/Support/Facades/Response.html) |
149-
Route | [Illuminate\Routing\Router](http://laravel.com/api/4.1/Illuminate/Routing/Router.html) | `router`
150-
Schema | [Illuminate\Database\Schema\Blueprint](http://laravel.com/api/4.1/Illuminate/Database/Schema/Blueprint.html) |
151-
Session | [Illuminate\Session\SessionManager](http://laravel.com/api/4.1/Illuminate/Session/SessionManager.html) | `session`
152-
Session (Instance) | [Illuminate\Session\Store](http://laravel.com/api/4.1/Illuminate/Session/Store.html) |
153-
SSH | [Illuminate\Remote\RemoteManager](http://laravel.com/api/4.1/Illuminate/Remote/RemoteManager.html) | `remote`
154-
SSH (Instance) | [Illuminate\Remote\Connection](http://laravel.com/api/4.1/Illuminate/Remote/Connection.html) |
155-
URL | [Illuminate\Routing\UrlGenerator](http://laravel.com/api/4.1/Illuminate/Routing/UrlGenerator.html) | `url`
156-
Validator | [Illuminate\Validation\Factory](http://laravel.com/api/4.1/Illuminate/Validation/Factory.html) | `validator`
157-
Validator (Instance) | [Illuminate\Validation\Validator](http://laravel.com/api/4.1/Illuminate/Validation/Validator.html)
158-
View | [Illuminate\View\Factory](http://laravel.com/api/4.1/Illuminate/View/Factory.html) | `view`
159-
View (Instance) | [Illuminate\View\View](http://laravel.com/api/4.1/Illuminate/View/View.html) |
119+
App | [Illuminate\Foundation\Application](http://laravel.com/api/4.2/Illuminate/Foundation/Application.html) | `app`
120+
Artisan | [Illuminate\Console\Application](http://laravel.com/api/4.2/Illuminate/Console/Application.html) | `artisan`
121+
Auth | [Illuminate\Auth\AuthManager](http://laravel.com/api/4.2/Illuminate/Auth/AuthManager.html) | `auth`
122+
Auth (Instance) | [Illuminate\Auth\Guard](http://laravel.com/api/4.2/Illuminate/Auth/Guard.html) |
123+
Blade | [Illuminate\View\Compilers\BladeCompiler](http://laravel.com/api/4.2/Illuminate/View/Compilers/BladeCompiler.html) | `blade.compiler`
124+
Cache | [Illuminate\Cache\Repository](http://laravel.com/api/4.2/Illuminate/Cache/Repository.html) | `cache`
125+
Config | [Illuminate\Config\Repository](http://laravel.com/api/4.2/Illuminate/Config/Repository.html) | `config`
126+
Cookie | [Illuminate\Cookie\CookieJar](http://laravel.com/api/4.2/Illuminate/Cookie/CookieJar.html) | `cookie`
127+
Crypt | [Illuminate\Encryption\Encrypter](http://laravel.com/api/4.2/Illuminate/Encryption/Encrypter.html) | `encrypter`
128+
DB | [Illuminate\Database\DatabaseManager](http://laravel.com/api/4.2/Illuminate/Database/DatabaseManager.html) | `db`
129+
DB (Instance) | [Illuminate\Database\Connection](http://laravel.com/api/4.2/Illuminate/Database/Connection.html) |
130+
Event | [Illuminate\Events\Dispatcher](http://laravel.com/api/4.2/Illuminate/Events/Dispatcher.html) | `events`
131+
File | [Illuminate\Filesystem\Filesystem](http://laravel.com/api/4.2/Illuminate/Filesystem/Filesystem.html) | `files`
132+
Form | [Illuminate\Html\FormBuilder](http://laravel.com/api/4.2/Illuminate/Html/FormBuilder.html) | `form`
133+
Hash | [Illuminate\Hashing\HasherInterface](http://laravel.com/api/4.2/Illuminate/Hashing/HasherInterface.html) | `hash`
134+
HTML | [Illuminate\Html\HtmlBuilder](http://laravel.com/api/4.2/Illuminate/Html/HtmlBuilder.html) | `html`
135+
Input | [Illuminate\Http\Request](http://laravel.com/api/4.2/Illuminate/Http/Request.html) | `request`
136+
Lang | [Illuminate\Translation\Translator](http://laravel.com/api/4.2/Illuminate/Translation/Translator.html) | `translator`
137+
Log | [Illuminate\Log\Writer](http://laravel.com/api/4.2/Illuminate/Log/Writer.html) | `log`
138+
Mail | [Illuminate\Mail\Mailer](http://laravel.com/api/4.2/Illuminate/Mail/Mailer.html) | `mailer`
139+
Paginator | [Illuminate\Pagination\Factory](http://laravel.com/api/4.2/Illuminate/Pagination/Factory.html) | `paginator`
140+
Paginator (Instance) | [Illuminate\Pagination\Paginator](http://laravel.com/api/4.2/Illuminate/Pagination/Paginator.html) |
141+
Password | [Illuminate\Auth\Reminders\PasswordBroker](http://laravel.com/api/4.2/Illuminate/Auth/Reminders/PasswordBroker.html) | `auth.reminder`
142+
Queue | [Illuminate\Queue\QueueManager](http://laravel.com/api/4.2/Illuminate/Queue/QueueManager.html) | `queue`
143+
Queue (Instance) | [Illuminate\Queue\QueueInterface](http://laravel.com/api/4.2/Illuminate/Queue/QueueInterface.html) |
144+
Queue (Base Class) | [Illuminate\Queue\Queue](http://laravel.com/api/4.2/Illuminate/Queue/Queue.html) |
145+
Redirect | [Illuminate\Routing\Redirector](http://laravel.com/api/4.2/Illuminate/Routing/Redirector.html) | `redirect`
146+
Redis | [Illuminate\Redis\Database](http://laravel.com/api/4.2/Illuminate/Redis/Database.html) | `redis`
147+
Request | [Illuminate\Http\Request](http://laravel.com/api/4.2/Illuminate/Http/Request.html) | `request`
148+
Response | [Illuminate\Support\Facades\Response](http://laravel.com/api/4.2/Illuminate/Support/Facades/Response.html) |
149+
Route | [Illuminate\Routing\Router](http://laravel.com/api/4.2/Illuminate/Routing/Router.html) | `router`
150+
Schema | [Illuminate\Database\Schema\Blueprint](http://laravel.com/api/4.2/Illuminate/Database/Schema/Blueprint.html) |
151+
Session | [Illuminate\Session\SessionManager](http://laravel.com/api/4.2/Illuminate/Session/SessionManager.html) | `session`
152+
Session (Instance) | [Illuminate\Session\Store](http://laravel.com/api/4.2/Illuminate/Session/Store.html) |
153+
SSH | [Illuminate\Remote\RemoteManager](http://laravel.com/api/4.2/Illuminate/Remote/RemoteManager.html) | `remote`
154+
SSH (Instance) | [Illuminate\Remote\Connection](http://laravel.com/api/4.2/Illuminate/Remote/Connection.html) |
155+
URL | [Illuminate\Routing\UrlGenerator](http://laravel.com/api/4.2/Illuminate/Routing/UrlGenerator.html) | `url`
156+
Validator | [Illuminate\Validation\Factory](http://laravel.com/api/4.2/Illuminate/Validation/Factory.html) | `validator`
157+
Validator (Instance) | [Illuminate\Validation\Validator](http://laravel.com/api/4.2/Illuminate/Validation/Validator.html) |
158+
View | [Illuminate\View\Factory](http://laravel.com/api/4.2/Illuminate/View/Factory.html) | `view`
159+
View (Instance) | [Illuminate\View\View](http://laravel.com/api/4.2/Illuminate/View/View.html) |

homestead.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- [Introduction](#introduction)
44
- [Included Software](#included-software)
55
- [Installation & Setup](#installation-and-setup)
6-
- [Daily Usage](#general-usage)
6+
- [Daily Usage](#daily-usage)
77
- [Ports](#ports)
88

99
<a name="introduction"></a>
@@ -15,6 +15,8 @@ Laravel Homestead is an official, pre-packaged Vagrant "box" that provides you a
1515

1616
Homestead runs on any Windows, Mac, and Linux, and includes the Nginx web server, PHP 5.5, MySQL, Postgres, Redis, Memcached and all of the other goodies you need to develop amazing Laravel applications.
1717

18+
Homestead is currently built and tested using Vagrant 1.6.
19+
1820
<a name="included-software"></a>
1921
## Included Software
2022

@@ -67,7 +69,7 @@ The `folders` property of the `Homestead.yaml` file lists all of the folders you
6769

6870
### Configure Your Nginx Sites
6971

70-
Not familiar with Nginx? No problem. The `sites` property allows you to easily map a "domain" to a folder on your Homestead environment. A sample site configuration is included in the `Homestead.yaml` file. Again, you may add as many sites to your Homestead environemnt as necessary.Homestead can serve as a convenient, virtualized environemnt for every Laravel project you are working on!
72+
Not familiar with Nginx? No problem. The `sites` property allows you to easily map a "domain" to a folder on your Homestead environment. A sample site configuration is included in the `Homestead.yaml` file. Again, you may add as many sites to your Homestead environment as necessary. Homestead can serve as a convenient, virtualized environment for every Laravel project you are working on!
7173

7274
### Bash Aliases
7375

@@ -108,7 +110,7 @@ To connect to your MySQL or Postgres database from your main machine via Navicat
108110
109111
### Adding Additional Sites
110112

111-
Once your Homestead environment is provisioned and running, you may want to add additional Nginx sites for your Laravel applications. You can run as many Laravel installation as you wish on a single Homestead environment. There are two ways to do this. First, you may simply add the sites to your `Homestead.yaml` file, `vagrant destroy` the box, and then `vagrant up` again.
113+
Once your Homestead environment is provisioned and running, you may want to add additional Nginx sites for your Laravel applications. You can run as many Laravel installations as you wish on a single Homestead environment. There are two ways to do this: First, you may simply add the sites to your `Homestead.yaml` file and then run `vagrant provision`.
112114

113115
Alternatively, you may use the `serve` script that is available on your Homestead environment. To use the `serve` script, SSH into your Homestead environment and run the following command:
114116

installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If you want to update the Laravel framework, you may issue the `php composer.pha
3535

3636
The Laravel framework has a few system requirements:
3737

38-
- PHP >= 5.3.7
38+
- PHP >= 5.4
3939
- MCrypt PHP Extension
4040

4141
As of PHP 5.5, some OS distributions may require you to manually install the PHP JSON extension. When using Ubuntu, this can be done via `apt-get install php5-json`.
@@ -51,7 +51,7 @@ Once Laravel is installed, you should also [configure your local environment](/d
5151
5252
<a name="permissions"></a>
5353
### Permissions
54-
Laravel may require one set of permissions to be configured: folders within app/storage require write access by the web server.
54+
Laravel may require one set of permissions to be configured: folders within `app/storage` require write access by the web server.
5555

5656
<a name="paths"></a>
5757
### Paths

0 commit comments

Comments
 (0)