You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cn/quick.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
1
# Laravel 快速入门
2
2
3
3
-[安装](#installation)
4
+
-[本地开发环境](#local-development-environment)
4
5
-[路由](#routing)
5
6
-[创建视图](#creating-a-view)
6
7
-[创建迁移](#creating-a-migration)
7
8
-[Eloquent ORM](#eloquent-orm)
8
9
-[显示数据](#displaying-data)
10
+
-[部署应用](#deploying-your-application)
9
11
10
12
<aname="installation"></a>
11
13
## 安装
@@ -42,6 +44,20 @@ Typically, you may use a web server such as Apache or Nginx to serve your Larave
42
44
43
45
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.
44
46
47
+
<aname="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
+
45
61
<aname="routing"></a>
46
62
## Routing
47
63
@@ -171,3 +187,10 @@ Now that we have made the `users` available to our view, we can display them lik
171
187
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.
172
188
173
189
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
+
<aname="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).
Copy file name to clipboardExpand all lines: homestead.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
-[Introduction](#introduction)
4
4
-[Included Software](#included-software)
5
5
-[Installation & Setup](#installation-and-setup)
6
-
-[Daily Usage](#general-usage)
6
+
-[Daily Usage](#daily-usage)
7
7
-[Ports](#ports)
8
8
9
9
<aname="introduction"></a>
@@ -15,6 +15,8 @@ Laravel Homestead is an official, pre-packaged Vagrant "box" that provides you a
15
15
16
16
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.
17
17
18
+
Homestead is currently built and tested using Vagrant 1.6.
19
+
18
20
<aname="included-software"></a>
19
21
## Included Software
20
22
@@ -67,7 +69,7 @@ The `folders` property of the `Homestead.yaml` file lists all of the folders you
67
69
68
70
### Configure Your Nginx Sites
69
71
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!
71
73
72
74
### Bash Aliases
73
75
@@ -108,7 +110,7 @@ To connect to your MySQL or Postgres database from your main machine via Navicat
108
110
109
111
### Adding Additional Sites
110
112
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` fileand then run `vagrant provision`.
112
114
113
115
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:
Copy file name to clipboardExpand all lines: installation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ If you want to update the Laravel framework, you may issue the `php composer.pha
35
35
36
36
The Laravel framework has a few system requirements:
37
37
38
-
- PHP >= 5.3.7
38
+
- PHP >= 5.4
39
39
- MCrypt PHP Extension
40
40
41
41
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
51
51
52
52
<aname="permissions"></a>
53
53
### 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.
0 commit comments