Skip to content

Fix formatting problem of diffAssoc code block introduced in PR #3455 #3456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,21 +293,21 @@ The `diff` method compares the collection against another collection or a plain
The `diffAssoc` method compares the collection against another collection or a plain PHP `array` based on its keys and values. This method will return the key / value pairs in the original collection that are not present in the given collection:

$collection = collect([
       'color' => 'orange',
       'type' => 'fruit',
       'remain' => 6
  ]);

  $diff = $collection->diffAssoc([
      'color' => 'yellow',
       'type' => 'fruit',
       'remain' => 3,
       'used' => 6
 olor ]);

'color' => 'orange',
'type' => 'fruit',
'remain' => 6
]);
$diff = $collection->diffAssoc([
'color' => 'yellow',
'type' => 'fruit',
'remain' => 3,
'used' => 6
]);
$diff->all();

  // ['color' => 'orange', 'remain' => 6]
// ['color' => 'orange', 'remain' => 6]

<a name="method-diffkeys"></a>
#### `diffKeys()` {#collection-method}
Expand Down