Choosing What to Group
Introduction
A busy restaurant records dozens of activities an hour: orders placed, menus edited, dishes marked sold out. A manager scanning the feed wants the overview, such as who was busy and where. A chef reading reviews wants each one in full. Grouping everything hides the reviews, and grouping nothing buries the overview.
Group activities when the reader needs an overview of who acted and where. Keep separate rows when each event's words, time or recorded details matter.
Choosing by the Reader's Task
| Kind of activity | A useful starting point |
|---|---|
| Signals, such as reactions or check-ins | Group when the reader mainly needs to know who participated and where. |
| Content, such as comments, questions or notes | Keep each contribution visible, including its body and attribution. |
| Bulk work, such as an upload or several completed tasks | Name the shared action and destination, then let the reader inspect members. |
| System mechanics, such as indexing and retries | Usually omit them from a person's feed; show a meaningful outcome when there is one. |
These are choices for a particular feed. An order-view count may be enough on an overview, while an investigation needs every view's time and recorded details. Start with what the reader needs to decide, then choose the read mode.
Grouping Routine Signals
A group of check-ins can answer “who is here?” without a separate headline for each person:
The sentence names the place as well as the people. Prefer that to an isolated “5 check-ins”. A reaction group should likewise name the thing people reacted to. Choose a grouping axis whose activities share the role you want to name. The built-in actors axis requires the same object. The actors_target axis requires the same target; its objects may differ.
Show a small sample of names and the number remaining. The payload's sample and distinct fields support that presentation. Use count for activities and distinct for people or objects; one person can act more than once.
Keeping Content Visible
Each notice below has something different to read. A count would hide the reason to open the feed:
The visitor guide includes entrances, parking and shop locations.
The counter opens at 10 am. Orders are available until 9 pm.
The same applies to comments, questions and quoted notes when their words matter. Retrieve individual activities with log() and render their bodies. A compact layout may reduce repeated avatars or headings while keeping every contribution and timestamp; that is a choice in your renderer, not a different Storyfeed read mode.
When each view is evidence, keep those rows separate too:
use Storyfeed\Facades\Storyfeed;
$views = Storyfeed::feed()
->only('view')
->log()
->get();Add ->involving($document) when the reader is investigating one document. Display the event details your application recorded, such as the time and whether the request was automated. Storyfeed does not infer those details from the verb. Grouping preserves the activities, but a collapsed sentence puts their evidence behind another interaction.
Summarizing Bulk Work
An upload group names the destination and keeps the photos available to inspect:



For work deliberately submitted together, consider a composite: one published activity with a collection of objects. Activities that merely happen near each other can use ordinary aggregation. Neither approach replaces the member content with the headline.
When members have names stored in activity data, show one or two names followed by the remaining count. Naming Group Members From Activity Data shows how to limit the displayed names. Count all members, including those omitted from the response. A group node nests at most grouping.children_limit members; a “Show all” control fetches the rest with members().
Showing System Outcomes
A recorded payment can be useful even when a service is the actor:
The actor and the affected order explain the event. Indexing, cache rebuilds and successful retries usually add no comparable information for the reader. Choose what to record before trying to hide that volume in a group. For already-recorded events, a feed's only() or except() filters can select what its readers need.
Choosing the Read Mode
Offer a grouped overview and a separate history of the same data when readers need both. See Choosing a Read Mode for live() and log().
keepLatest() and retention change which events remain available. Use them only when that matches the history you intend to keep, rather than as display settings for a crowded feed.