mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
put change log in docs.
This commit is contained in:
parent
7d30d179b7
commit
c31df7379b
@ -1,4 +1,4 @@
|
||||
## Laravel Change Log
|
||||
# Laravel Change Log
|
||||
|
||||
## Contents
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
|
||||
- Fixed the passing of strings into the Input::except method.
|
||||
- Fixed replacement of optional parameters in URL::transpose method.
|
||||
- Added "to_array" method to the base Eloquent model.
|
||||
- Added "$hidden" static variable to the base Eloquent model.
|
||||
- Added "sync" method to has_many_and_belongs_to Eloquent relationship.
|
||||
- [Added `to_array` method to the base Eloquent model](/docs/database/eloquent#to-array).
|
||||
- [Added `$hidden` static variable to the base Eloquent model](/docs/database/eloquent#to-array).
|
||||
- [Added `sync` method to has\_many\_and\_belongs\_to Eloquent relationship](/docs/database/eloquent#sync-method).
|
||||
- Improved View performance by only loading contents from file once.
|
||||
- Fix handling of URLs beginning with has in URL::to.
|
||||
|
@ -1,5 +1,6 @@
|
||||
### General
|
||||
- [Laravel Overview](/docs/home)
|
||||
- [Change Log](/docs/changes)
|
||||
- [Installation & Setup](/docs/install)
|
||||
- [Requirements](/docs/install#requirements)
|
||||
- [Installation](/docs/install#installation)
|
||||
|
@ -304,6 +304,7 @@ However, you may often only want to insert a new record into the intermediate ta
|
||||
|
||||
$user->roles()->attach($role_id);
|
||||
|
||||
<a name="sync-method"></a>
|
||||
Alternatively, you can use the `sync` method, which accepts an array of IDs to "sync" with the intermediate table. After this operation is complete, only the IDs in the array will be on the intermediate table.
|
||||
|
||||
$user->roles()->sync(array(1, 2, 3));
|
||||
|
Loading…
x
Reference in New Issue
Block a user