Skip to content

Commit

Permalink
[compare] 6582c3d...26ddf9b
Browse files Browse the repository at this point in the history
Черновик
Update broadcasting.md
Добавит недостающие файлы
Update cache.md
Update collections.md
Update configuration.md
Update console-tests.md
Update container.md
Update contributions.md
Update controllers.md
Update database-testing.md
Update database.md
Update deployment.md
Update dusk.md
Update eloquent-collections.md
Update eloquent-factories.md
Update eloquent-mutators.md
Update eloquent-relationships.md
Update eloquent-resources.md
Update eloquent-serialization.md
Update eloquent.md
Update facades.md
Update filesystem.md
Update fortify.md
Update helpers.md
Update homestead.md
Update horizon.md
Update http-client.md
Update http-tests.md
Update installation.md
Update logging.md
Update mail.md
Update middleware.md
Update migrations.md
Create mix-old.md
Update mix.md
Update mocking.md
Update notifications.md
Update octane.md
Update packages.md
Update pagination.md
Update passport.md
Update queries.md
Update queues.md
Update releases.md
Update requests.md
Update routing.md
Update sail.md
Update sanctum.md
Update scheduling.md
Update scout.md
Update seeding.md
Update session.md
Update starter-kits.md
Update structure.md
Update upgrade.md
Update valet.md
Update validation.md
Update verification.md
  • Loading branch information
russsiq committed Mar 28, 2023
1 parent 19b7672 commit 2110f81
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 52 deletions.
20 changes: 20 additions & 0 deletions docs/eloquent-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
- [makeVisible](#method-makeVisible)
- [makeHidden](#method-makeHidden)
- [only](#method-only)
- [setVisible](#method-setVisible)
- [setHidden](#method-setHidden)
- [toQuery](#method-toquery)
- [unique](#method-unique)

Expand Down Expand Up @@ -150,6 +152,8 @@

$users->load('comments.author');

$users->load(['comments', 'posts' => fn ($query) => $query->where('active', 1)]);

<a name="method-loadMissing"></a>
#### `loadMissing($relations)`

Expand All @@ -159,6 +163,8 @@

$users->loadMissing('comments.author');

$users->loadMissing(['comments', 'posts' => fn ($query) => $query->where('active', 1)]);

<a name="method-modelKeys"></a>
#### `modelKeys()`

Expand Down Expand Up @@ -189,6 +195,20 @@

$users = $users->only([1, 2, 3]);

<a name="method-setVisible"></a>
#### `setVisible($attributes)`

Метод `setVisible` [временно переопределяет](eloquent-serialization.md#temporarily-modifying-attribute-visibility) все видимые атрибуты каждой модели в коллекции:

$users = $users->setVisible(['id', 'name']);

<a name="method-setHidden"></a>
#### `setHidden($attributes)`

Метод `setHidden` [временно переопределяет](eloquent-serialization.md#temporarily-modifying-attribute-visibility) все скрытые атрибуты каждой модели в коллекции:

$users = $users->setHidden(['email', 'password', 'remember_token']);

<a name="method-toquery"></a>
#### `toQuery()`

Expand Down
Loading

0 comments on commit 2110f81

Please sign in to comment.