Commit 07bec5c0 authored by Taylor Otwell's avatar Taylor Otwell

Merge branch 'master' into staging

parents 8afab342 1f005bd7
...@@ -3,8 +3,4 @@ language: php ...@@ -3,8 +3,4 @@ language: php
php: php:
- 5.3 - 5.3
script: "php artisan test:core" script: "php artisan test:core"
\ No newline at end of file
notifications:
irc:
- "irc.freenode.org#laravel"
\ No newline at end of file
...@@ -299,7 +299,7 @@ Let's assume you have a **Post** model that has many comments. Often you may wan ...@@ -299,7 +299,7 @@ Let's assume you have a **Post** model that has many comments. Often you may wan
$post = Post::find(1); $post = Post::find(1);
$post->comments()->insert($comment); $comment = $post->comments()->insert($comment);
When inserting related models through their parent model, the foreign key will automatically be set. So, in this case, the "post_id" was automatically set to "1" on the newly inserted comment. When inserting related models through their parent model, the foreign key will automatically be set. So, in this case, the "post_id" was automatically set to "1" on the newly inserted comment.
...@@ -323,7 +323,7 @@ This is even more helpful when working with many-to-many relationships. For exam ...@@ -323,7 +323,7 @@ This is even more helpful when working with many-to-many relationships. For exam
$user = User::find(1); $user = User::find(1);
$user->roles()->insert($role); $role = $user->roles()->insert($role);
Now, when the Role is inserted, not only is the Role inserted into the "roles" table, but a record in the intermediate table is also inserted for you. It couldn't be easier! Now, when the Role is inserted, not only is the Role inserted into the "roles" table, but a record in the intermediate table is also inserted for you. It couldn't be easier!
......
...@@ -124,7 +124,7 @@ You may discover the need to group portions of a WHERE clause within parentheses ...@@ -124,7 +124,7 @@ You may discover the need to group portions of a WHERE clause within parentheses
->or_where(function($query) ->or_where(function($query)
{ {
$query->where('age', '>', 25); $query->where('age', '>', 25);
$query->where('votes' '>', 100); $query->where('votes', '>', 100);
}) })
->get(); ->get();
......
...@@ -78,6 +78,13 @@ In the following example the first parameter is the route that you're "registeri ...@@ -78,6 +78,13 @@ In the following example the first parameter is the route that you're "registeri
// //
}); });
#### Catching the remaining URI without limitations:
Route::get('files/(:all)', function($path)
{
//
});
#### Allowing a URI segment to be optional: #### Allowing a URI segment to be optional:
Route::get('page/(:any?)', function($page = 'index') Route::get('page/(:any?)', function($page = 'index')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment