Skip to content

Commit 12dd21f

Browse files
author
Shawn McCool
committed
Merge branch 'hotfix/anax'
2 parents 4144de9 + e35cce1 commit 12dd21f

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

database/config.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Quick Start Using SQLite](#quick)
66
- [Configuring Other Databases](#server)
77
- [Setting The Default Connection Name](#default)
8+
- [Configuration By Environment](#environment)
89

910
Laravel supports the following databases out of the box:
1011

@@ -43,4 +44,16 @@ As you have probably noticed, each database connection defined in the **applicat
4344

4445
'default' => 'sqlite';
4546

46-
The default connection will always be used by the [fluent query builder](/docs/database/fluent). If you need to change the default connection during a request, use the **Config::set** method.
47+
The default connection will always be used by the [fluent query builder](/docs/database/fluent). If you need to change the default connection during a request, use the **Config::set** method.
48+
49+
<a name="environment"></a>
50+
## Configuration By Environment
51+
52+
It's common to have database configuration files for each environment your app will run in. Set your [environment variable](/docs/install#environments) and then put a database config file in the appropriate location. For example on a local development machine you might have your environment set to **local**. You would then have two database.php files:
53+
54+
application/config/database.php //default (production) config
55+
application/config/local/database.php //local development config
56+
57+
*Further Reading:*
58+
59+
- *[Environments](/docs/install#environments)*

database/eloquent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,9 @@ Or, mass-assignment may be accomplished using the **fill** method.
457457

458458
$user->save();
459459

460-
By default, all attribute key/value pairs will be store during mass-assignment. However, it is possible to create a white-list of attributes that will be set. If the accessible attribute white-list is set then no attributes other than those specified will be set during mass-assignment.
460+
By default, all attribute key/value pairs will be stored during mass-assignment. However, it is possible to create a whitelist of attributes that will be set. If the accessible attribute whitelist is set then no attributes other than those specified will be set during mass-assignment.
461461

462-
You can specify accessible attributes by assigning the **$accessible** static array. Each element contains the name of a white-listed attribute.
462+
You can specify accessible attributes by assigning the **$accessible** static array. Each element contains the name of a whitelisted attribute.
463463

464464
public static $accessible = array('email', 'password', 'name');
465465

database/raw.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Laravel provides a few other methods to make querying your database simple. Here
4343
#### Running a SELECT query and getting the value of a single column:
4444

4545
$email = DB::only('select email from users where id = 1');
46+
47+
> **Note:** If more than one record matches for **DB::only()**, just the first result will be returned.
4648
4749
<a name="pdo-connections"></a>
4850
## PDO Connections

logging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<a name="basic-configuration"></a>
1010
## Basic Configuration
1111

12-
All of the configuration options regarding errors and logging live in the **application/config/errors.php** file. Let's jump right in.
12+
All of the configuration options regarding errors and logging live in the **application/config/error.php** file. Let's jump right in.
1313

1414
### Ignored Errors
1515

16-
The **ignore** option contains an array of error levels that should be ignored by Laravel. By "ignored", we mean that we won't stop execution of the script on these errors. However, they will be logged when logging is enabled.
16+
The **ignore** option contains an array of [PHP error levels](http://php.net/manual/en/errorfunc.constants.php) that should be ignored by Laravel. By "ignored", we mean that we won't stop execution of the script on these errors. However, they will be logged when logging is enabled.
1717

1818
### Error Detail
1919

validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ Many times, when updating a record, you want to use the unique rule, but exclude
193193

194194
#### Validate that a date attribute is before a given date:
195195

196-
'birthdate' => 'before:1986-28-05';
196+
'birthdate' => 'before:1986-05-28';
197197

198198
#### Validate that a date attribute is after a given date:
199199

200-
'birthdate' => 'after:1986-28-05';
200+
'birthdate' => 'after:1986-05-28';
201201

202202
> **Note:** The **before** and **after** validation rules use the **strtotime** PHP function to convert your date to something the rule can understand.
203203

views/assets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ In this example, we are registering the **jquery-ui** asset, as well as specifyi
4949
<a name="asset-containers"></a>
5050
## Asset Containers
5151

52-
To increase response time, it is common to place JavaScript at the bottom of HTML documents. But, what if you also need to place some assets in the head of your document? No problem. The asset class provides a simple way to manage asset **containers**. Simply call the **container** method on the Asset class and mention the container name. Once you have a container instance, you are free to add any assets you wish to the container using the same syntax you are used to:
52+
To improve response time, it is common to place JavaScript at the bottom of HTML documents. But, what if you also need to place some assets in the head of your document? No problem. The asset class provides a simple way to manage asset **containers**. Simply call the **container** method on the Asset class and mention the container name. Once you have a container instance, you are free to add any assets you wish to the container using the same syntax you are used to:
5353

5454
#### Retrieving an instance of an asset container:
5555

5656
Asset::container('footer')->add('example', 'js/example.js');
5757

58-
#### Dumping that assets from a given container:
58+
#### Dumping that asset from a given container:
5959

6060
echo Asset::container('footer')->scripts();
6161

0 commit comments

Comments
 (0)