Retrieving Feeds
Introduction
To retrieve a page of activities, call the feed method on the Storyfeed facade, followed by the get method.
Retrieving a Feed
You may return the feed from a route:
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
Route::get('/', function () {
return Storyfeed::feed()->limit(20)->get();
});A feed is ordered by published_at, newest first. Rows published at the same instant read highest id first, grouped or not; see Ordering. To show data in your own order, or without dates, compose a feed.
For three order placements, the response contains:
[
{
"kind": "group",
"id": "grp_djIfcmVwZWF0H2IxOjMxZDY1NTliMzQwMTdmOTY5NzcxNGViZGRkMzllN2QyYmFjZWZmNjhhZjIxNGQ0OGMzZjE1M2VjMzg2NmFlNTM6MDBlN3F0MW53MDAwMDAwMDAwMDAwMDAwMDE",
"axis": "repeat",
"count": 3,
"verb": "place",
"published_at": "1985-07-02T12:02:00.000000Z",
"headline_template": ":actor placed :count orders with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": null,
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": null,
"sample": {
"actors": [
{
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
}
],
"objects": [
{
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
}
],
"targets": [
{
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
}
],
"contexts": [],
"origins": [],
"results": [],
"instruments": [],
"locations": [],
"generators": [],
"featured": [
{
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
}
]
},
"distinct": {
"actors": 1,
"objects": 3,
"targets": 1,
"contexts": 0,
"origins": 0,
"results": 0,
"instruments": 0,
"locations": 0,
"generators": 0,
"featured": 3
},
"children": [
{
"kind": "activity",
"id": "a-order-3",
"verb": "place",
"published_at": "1985-07-02T12:02:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
},
{
"kind": "activity",
"id": "a-order-2",
"verb": "place",
"published_at": "1985-07-02T12:01:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
},
{
"kind": "activity",
"id": "j84",
"verb": "place",
"published_at": "1985-07-02T12:00:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
}
],
"children_truncated": false,
"tombstoned": [],
"redundant": false,
"distinct_tombstoned": {
"actors": 0,
"objects": 0,
"targets": 0,
"contexts": 0,
"origins": 0,
"results": 0,
"instruments": 0,
"locations": 0,
"generators": 0,
"featured": 0
}
}
]The get method returns a Laravel collection of Storyfeed\Support\FeedItem instances, so a route that returns it responds with a JSON array of items. The rendered feed displays:
The three orders appear in one row. A group combines related activities, such as repeated orders by one customer, while retaining its members. See Aggregation for grouping rules and headlines.
Choosing a Read Mode
| Call | Returns |
|---|---|
->live() | one-action bursts; the default |
->log() | one item per activity, without groups |
The following feeds display the same week of activities in each mode:
Live
Live groups the same action into one row until a quiet gap closes the burst. It is the default, so you may omit live(). See Aggregation for which activities share a row and Live Burst Windows to set the window.
use Storyfeed\Facades\Storyfeed;
Storyfeed::feed()->live()->get();Today
Planck’s constant is 6.62607004.




- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
- a hot dog
- a corn dog
- a pretzel

Is that free for life, or only for today?

- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
What the machine needs
Alexei’s account: the machine is opening a gate beneath the mall.
- Locate the control room.
- Reach the two shutdown keys.
- Check the safe combination before going in.
Working note: translation is evidence, not a complete floor plan.
Yesterday
Find out where the elevator in the storeroom goes down to.
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
Tuesday
Unlock the storeroom door from the inside so the others can get in.
Crawl through the ducts into the locked storeroom.
Pickup at 12:15 PM
- Placed
- Confirmed
- Ready
Is that free for life, or only for today?
Can I collect this at the counter?
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12

hawkins-post-internship-agreement.pdf
hawkins-post-internship-agreement.pdf
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
The visitor guide includes entrances, parking and shop locations.
The counter opens at 10 am. Orders are available until 9 pm.
Monday

- Title
- Filter out the static
- Branch
- static-filter
- Files changed
- 2
- Title
- Add a tape recorder input
- Branch
- tape-input
- Files changed
- 4
Match each line of the message to a place in the mall.
Every magnet on the store display fell off at once, then did it again an hour later.
Sunday
Pick out the mall in the sounds behind the message on the tape.
Work out what the Russian message on the tape is saying.




They came back every night for my fertilizer, bag after bag
They came back every night for my fertilizer, bag after bag
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
Every magnet on the store display fell off at once, then did it again an hour later.
Every magnet on the store display fell off at once, then did it again an hour later.
Saturday
STATION: CEREBRO / WEATHERTOP
CALL TO UTAH .......... NO REPLY
UNEXPECTED SIGNAL .... VOICE / RUSSIAN
MESSAGE .............. REPEATING
NEXT STEP ............ KEEP THE TAPETape the Russian message Cerebro picked up on Weathertop.
- About
- The radio built at camp, to reach Utah from Weathertop
- Visibility
- Public
Friday
The power went out across town this evening. It came back on its own a minute later.
- Director
- George A. Romero
- Showing
- Sneak preview
- Director
- George A. Romero
- Showing
- Sneak preview
- Director
- George A. Romero
- Showing
- Sneak preview
- Director
- George A. Romero
- Showing
- Sneak preview
- Title
- Boost the range to reach Utah
- Branch
- utah-range
- Files changed
- 2
- Title
- Wire up the transmitter
- Branch
- transmitter
- Files changed
- 5
- Title
- Add the antenna mount
- Branch
- antenna-mount
- Files changed
- 3
- About
- The radio built at camp, to reach Utah from Weathertop
- Visibility
- Public
See Choosing What to Group when deciding which events belong in an overview and which need individual rows.
Log
Log mode returns one item per activity.
use Storyfeed\Facades\Storyfeed;
Storyfeed::feed()->log()->get();Today
Planck’s constant is 6.62607004.


- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12


- a hot dog
- a corn dog
- a pretzel
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12

Is that free for life, or only for today?

- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
What the machine needs
Alexei’s account: the machine is opening a gate beneath the mall.
- Locate the control room.
- Reach the two shutdown keys.
- Check the safe combination before going in.
Working note: translation is evidence, not a complete floor plan.
Yesterday
Find out where the elevator in the storeroom goes down to.
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
Tuesday
Unlock the storeroom door from the inside so the others can get in.
Crawl through the ducts into the locked storeroom.
Pickup at 12:15 PM
- Placed
- Confirmed
- Ready
Is that free for life, or only for today?
Can I collect this at the counter?
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12

hawkins-post-internship-agreement.pdf
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
hawkins-post-internship-agreement.pdf
The visitor guide includes entrances, parking and shop locations.
The counter opens at 10 am. Orders are available until 9 pm.
Monday

- Title
- Filter out the static
- Branch
- static-filter
- Files changed
- 2
- Title
- Add a tape recorder input
- Branch
- tape-input
- Files changed
- 4
Match each line of the message to a place in the mall.
Every magnet on the store display fell off at once, then did it again an hour later.
Sunday
Pick out the mall in the sounds behind the message on the tape.
Work out what the Russian message on the tape is saying.




They came back every night for my fertilizer, bag after bag
They came back every night for my fertilizer, bag after bag
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
Every magnet on the store display fell off at once, then did it again an hour later.
Every magnet on the store display fell off at once, then did it again an hour later.
Saturday
STATION: CEREBRO / WEATHERTOP
CALL TO UTAH .......... NO REPLY
UNEXPECTED SIGNAL .... VOICE / RUSSIAN
MESSAGE .............. REPEATING
NEXT STEP ............ KEEP THE TAPETape the Russian message Cerebro picked up on Weathertop.
- About
- The radio built at camp, to reach Utah from Weathertop
- Visibility
- Public
Friday
The power went out across town this evening. It came back on its own a minute later.
- Director
- George A. Romero
- Showing
- Sneak preview
- Director
- George A. Romero
- Showing
- Sneak preview
- Director
- George A. Romero
- Showing
- Sneak preview
- Director
- George A. Romero
- Showing
- Sneak preview
- Title
- Boost the range to reach Utah
- Branch
- utah-range
- Files changed
- 2
- Title
- Wire up the transmitter
- Branch
- transmitter
- Files changed
- 5
- Title
- Add the antenna mount
- Branch
- antenna-mount
- Files changed
- 3
- About
- The radio built at camp, to reach Utah from Weathertop
- Visibility
- Public
Both modes return the same payload shape.
Filtering Activities
The filtering examples use this set of activities:
Today
Is that free for life, or only for today?
Tuesday
Is that free for life, or only for today?
Sunday
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
Filtering by Entity or Role
Use the involving method to retrieve activities that reference an entity in any role:
use App\Models\Order;
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
Route::get('/orders/{order}/feed', function (Order $order) {
return Storyfeed::feed()->involving($order)->get();
});For the order in the sample, the filter keeps its placements, confirmation and readiness activity:
Inside that route, the model provides the same query:
// Retrieve the same activities through the model.
return $order->storyfeed()->get();involving($ancestor) also includes activity anywhere beneath an ancestor's recorded parent hierarchy: task → list → folder → project → workspace → tenant is retrieved with involving($tenant). Use involvingDirectly($tenant) to exclude that hierarchy. See Distant Relations for parent declarations and depth limits.
You may also filter by a specific role:
| Call | Returns |
|---|---|
->involving($model) | activities where the model holds any role, or is a recorded ancestor |
->involvingDirectly($model) | the same, without recorded ancestors; also written ->involving($model, deep: false) |
->context($shop) | activities with the shop in the context role |
->actor($customer) | activities performed by the customer |
->object($order) / ->target($shop) | activities matching the specified role; origin(), result(), instrument(), location() and generator() filter the remaining roles the same way |
->objectType(Order::class) | activities whose object is any order; every role has a …Type() method that accepts a model class, a model, a morph alias, or a list of them |
->involvingType(Order::class) | activities involving any order, as involving() does for one model; deep: false excludes recorded ancestors |
Filters on different roles apply together. Group counts include only matching activities.
The Difference Between Involving and Context
The context method matches only the context role. An activity that adds a product to a menu assigns the product to the object role, so use involving to include it in the product's feed. See Containers & Context.
Filtering by Verb
Use the verb method to filter by one verb. The only and except methods accept lists:
use Storyfeed\Facades\Storyfeed;
Storyfeed::feed()->verb('place')->get();use Storyfeed\Facades\Storyfeed;
Storyfeed::feed()->only(['place', 'ready'])->get();use App\Enums\OrderActivity;
use Storyfeed\Facades\Storyfeed;
Storyfeed::feed()->only(['re*', OrderActivity::Confirmed])->get();This matches ready, reprice and confirm in the sample:
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
use Storyfeed\Facades\Storyfeed;
Storyfeed::feed()->except(['note'])->get();The note is omitted; the other activities remain:
Is that free for life, or only for today?
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
| Input | Behaviour |
|---|---|
| a list | accepts verb strings and enum cases together |
re* | matches verbs starting with re |
| an unrecognised verb | matches no activities unless that verb has been recorded; does not throw |
only([]) or except([]) | throws an exception |
repeated only() / except() calls | activities must match every accumulated filter |
repeated verb() calls | the last value replaces the previous verb |
Groups include only activities whose verbs match the filter.
Custom Query Constraints
Use the query method to apply custom constraints to the activity query:
use App\Models\Shop;
use Illuminate\Support\Facades\Route;
use Storyfeed\Models\Builders\ActivityBuilder;
Route::get('/shops/{shop}/feed', function (Shop $shop) {
return $shop->storyfeed()
->query(fn (ActivityBuilder $query) => $query->whereNot('verb', 'note'))
->get();
});For the sample shop, this excludes notes while retaining its other activities:
To limit that route to activities published since 5 pm, replace its return expression with:
use Storyfeed\Models\Builders\ActivityBuilder;
// Activities published since 5 pm today.
return $shop->storyfeed()
->query(fn (ActivityBuilder $query) => $query
->where('published_at', '>=', today()->setHour(17)))
->get();In the sample, only the questions after 5 pm remain:
Constraints apply to activities and groups. The callback can only narrow the results: orWhere cannot bypass existing filters, ordering is ignored, and limit() or offset() throws an exception. Set the page size with the feed builder's limit method.
Conditional Constraints
Use the when method to apply a filter only when a value is present:
use App\Models\Shop;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
use Storyfeed\FeedBuilder;
Route::get('/feed', function (Request $request) {
$input = $request->validate(['shop' => ['nullable', 'integer', 'exists:shops,id']]);
$shop = isset($input['shop']) ? Shop::find($input['shop']) : null;
return Storyfeed::feed()
->when($shop, fn (FeedBuilder $feed, Shop $shop) => $feed->involving($shop))
->get();
});With the sample shop selected, only activities involving it remain:
Is that free for life, or only for today?
Without shop, the query returns the whole sample:
Is that free for life, or only for today?
Is that free for life, or only for today?
- Price
- $2.95
- Section
- Sundaes
- Available
- At the counter
- Orders
- 12
Paginating Results
To paginate a feed, call the cursorPaginate method. It returns a Storyfeed\FeedPaginator, Laravel's cursor paginator, and retrieves the cursor from the current request:
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
Route::get('/', function () {
return view('feed', [
'page' => Storyfeed::feed()->log()->cursorPaginate(2),
]);
});The argument specifies the number of items per page. If you omit it, the paginator uses the builder's limit, which defaults to 30. Iterating over the paginator returns Storyfeed\Support\FeedItem instances.
To display pagination links in Blade, call the links method:
@foreach ($page as $item)
{{ $item->headline() }}
@endforeach
{{ $page->links() }}With a page size of two in log mode, the three placements split across two pages. Page one contains the newest two:
Follow $page->nextPageUrl() to retrieve the remaining placement:
The paginator uses Laravel's simple pagination views, including any views you have customized in your application. Feeds paginate forward only, so the previous-page link is disabled: previousPageUrl returns null, and nextPageUrl returns null on the last page. See Storage Architecture for what a cursor holds.
Customizing Pagination URLs
To use a different query string parameter, pass its name as the second argument:
use Storyfeed\Facades\Storyfeed;
$page = Storyfeed::feed()->cursorPaginate(15, 'feed_cursor');Use the withQueryString method to include the current request's query string in pagination links. You may also append specific values or a URL fragment:
use Storyfeed\Facades\Storyfeed;
$page = Storyfeed::feed()->cursorPaginate(15)->withQueryString();
$page->appends(['filter' => 'mine'])->fragment('activity');Simple Pagination
The simplePaginate method returns numbered pages with no total, as Laravel's simplePaginate does. It reads the page number from the page query string parameter:
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
Route::get('/', function () {
return view('feed', [
'page' => Storyfeed::feed()->simplePaginate(15),
]);
});New activities arrive at the top of a feed, so a numbered page shifts while a reader moves through it, and an item can appear on two pages. A cursor does not shift, so prefer cursorPaginate.
There is no paginate method. A total would mean counting the whole grouped feed, so calling it throws an exception that says so and names cursorPaginate and simplePaginate.
Returning JSON
Returning the paginator from a route responds with Laravel's cursor paginator JSON: the items in data, then path, per_page, next_cursor, next_page_url, prev_cursor, and prev_page_url. Two keys follow, the way an API resource's additional method adds them: payload_version and sync_token.
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
Route::get('/feed', function () {
return Storyfeed::feed()->cursorPaginate(2);
});For the three placements, page one responds with:
{
"data": [
{
"kind": "activity",
"id": "a-order-3",
"verb": "place",
"published_at": "1985-07-02T12:02:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
},
{
"kind": "activity",
"id": "a-order-2",
"verb": "place",
"published_at": "1985-07-02T12:01:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
}
],
"path": "https://example.com",
"per_page": 30,
"next_cursor": "eyJwIjoiMjAyNi0wOC0xNFQxNDowNTowMFoifQ",
"next_page_url": "https://example.com?cursor=eyJwIjoiMjAyNi0wOC0xNFQxNDowNTowMFoifQ",
"prev_cursor": null,
"prev_page_url": null,
"payload_version": 1,
"sync_token": "01J8Z3K4Q2V9WMX7R5T0B6N1CD"
}| Key | Page One | Next Page |
|---|---|---|
data | the two newest placements | the remaining placement |
next_cursor | an opaque string | null |
next_page_url | the URL containing that cursor | null |
prev_cursor | null | an opaque cursor towards the newer page |
prev_page_url | null | the URL containing that cursor |
payload_version | 1 | 1 |
sync_token | the feed's token, or null | the same token while the feed's history is unchanged |
simplePaginate responds with Laravel's simple paginator JSON, the items in data, followed by the same two keys.
Cursor strings are opaque. Pass them back unchanged without decoding or constructing them. In PHP, the paginator's nextCursor method returns a Laravel cursor object, its encode method returns the string, and the syncToken method returns the sync token.
Paginating Without a Request
For jobs and commands, pass the cursor as the third argument. The paginator's nextCursor method returns the cursor for the next page, or null on the last page:
use Storyfeed\Facades\Storyfeed;
$cursor = null;
do {
$page = Storyfeed::feed()->cursorPaginate(100, cursor: $cursor);
foreach ($page as $item) {
// ...
}
} while ($cursor = $page->nextCursor());Handling a Changed Feed
Use these response keys for subsequent requests:
| Key | Usage |
|---|---|
next_cursor | pass as ?cursor= to retrieve the next page; null on the last page |
sync_token | if it changes, discard previously loaded items and request the first page again |
Use a cursor with the same feed constraints, filters, mode, and query callbacks that produced it.
Paginating a Group's Members
A group node carries its newest members in children, up to grouping.children_limit. When children_truncated is true, pass the group's id to the members method to page through all of them:
use Illuminate\Support\Facades\Route;
use Storyfeed\Facades\Storyfeed;
Route::get('/feed/groups/{group}', function (string $group) {
return Storyfeed::feed()->members($group, 50);
});The members method returns a FeedPaginator, as cursorPaginate does, with the members as activity nodes, newest first. It accepts the same per-page, cursor name and cursor arguments. Members are read through the feed you call it on, with its filters and scope, so a reader never sees a member that feed would not show. A member whose model was deleted is still listed, as a tombstone.
The Payload
The feed payload is a JSON document containing activity and group items, ordered newest first. See The Payload Contract for all fields.
Paginated Responses
A paginated page containing one activity has this payload:
{
"data": [
{
"kind": "activity",
"id": "j84",
"verb": "place",
"published_at": "1985-07-02T12:00:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
}
],
"path": "https://example.com",
"per_page": 30,
"next_cursor": "eyJwIjoiMjAyNi0wOC0xNFQxNDowNTowMFoifQ",
"next_page_url": "https://example.com?cursor=eyJwIjoiMjAyNi0wOC0xNFQxNDowNTowMFoifQ",
"prev_cursor": null,
"prev_page_url": null,
"payload_version": 1,
"sync_token": "01J8Z3K4Q2V9WMX7R5T0B6N1CD"
}The items are in data. Pass next_cursor to retrieve the next page. See Paginating Results and Response Envelope for all response keys.
Each role holds an entity with its type, id, label and link, or null when empty. See Entities.
Group Items
A group represents several activities in one item. This example groups three orders placed by one customer:
[
{
"kind": "group",
"id": "grp_djIfcmVwZWF0H2IxOjMxZDY1NTliMzQwMTdmOTY5NzcxNGViZGRkMzllN2QyYmFjZWZmNjhhZjIxNGQ0OGMzZjE1M2VjMzg2NmFlNTM6MDBlN3F0MW53MDAwMDAwMDAwMDAwMDAwMDE",
"axis": "repeat",
"count": 3,
"verb": "place",
"published_at": "1985-07-02T12:02:00.000000Z",
"headline_template": ":actor placed :count orders with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": null,
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": null,
"sample": {
"actors": [
{
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
}
],
"objects": [
{
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
}
],
"targets": [
{
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
}
],
"contexts": [],
"origins": [],
"results": [],
"instruments": [],
"locations": [],
"generators": [],
"featured": [
{
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
{
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
}
]
},
"distinct": {
"actors": 1,
"objects": 3,
"targets": 1,
"contexts": 0,
"origins": 0,
"results": 0,
"instruments": 0,
"locations": 0,
"generators": 0,
"featured": 3
},
"children": [
{
"kind": "activity",
"id": "a-order-3",
"verb": "place",
"published_at": "1985-07-02T12:02:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1041",
"label": "Order #1041",
"link": {
"href": "/orders/1041",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#c2410c",
"files": [],
"slots": []
},
"media_ref": "mac35da78ef096c0b",
"entity_ref": "e0e26f8c29914ff76",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
},
{
"kind": "activity",
"id": "a-order-2",
"verb": "place",
"published_at": "1985-07-02T12:01:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1040",
"label": "Order #1040",
"link": {
"href": "/orders/1040",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#be123c",
"files": [],
"slots": []
},
"media_ref": "mba60255db93f7447",
"entity_ref": "eb99142665bd9eeec",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
},
{
"kind": "activity",
"id": "j84",
"verb": "place",
"published_at": "1985-07-02T12:00:00.000000Z",
"starts_at": null,
"ends_at": null,
"headline_template": ":actor placed :object with :target",
"headline": null,
"bindings": null,
"glyph": "shopping-bag",
"glyph_intent": "pending",
"actor": {
"type": "user",
"id": "113",
"label": "Erica Sinclair",
"link": {
"href": "/users/113",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": {
"src": "/media/worlds/stranger-things/avatars/scout.jpg",
"mediaType": "image/jpeg",
"width": 256,
"height": 256,
"alt": null
},
"image": null,
"preview": null,
"initials": null,
"color": null,
"files": [],
"slots": []
},
"media_ref": "maa7c0cfb07af83e2",
"entity_ref": "ebe52ab4d5e63692e",
"body": null,
"tombstone": null
},
"object": {
"type": "order",
"id": "1035",
"label": "Order #1035",
"link": {
"href": "/orders/1035",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": null,
"initials": "O1",
"color": "#4d7c0f",
"files": [],
"slots": []
},
"media_ref": "ma9527581042280f7",
"entity_ref": "e722f0b114fd1ec13",
"body": null,
"tombstone": null
},
"target": {
"type": "venue",
"id": "101",
"label": "Scoops Ahoy",
"link": {
"href": "/venues/scoops",
"modal": false,
"attributes": []
},
"data": [],
"media": {
"icon": null,
"image": null,
"preview": {
"src": "/media/worlds/stranger-things/parlour.jpg",
"mediaType": "image/jpeg",
"width": 960,
"height": 720,
"alt": "An ice cream counter"
},
"initials": "SA",
"color": "#9f1239",
"files": [],
"slots": []
},
"media_ref": "m1bcad7c79ddfc05d",
"entity_ref": "e352bb6f37b7d8bfe",
"body": [
{
"$body": "Storyfeed/Body/Image",
"$v": 3,
"alt": "Scoops Ahoy",
"caption": "Scoops Ahoy",
"image": "preview"
}
],
"tombstone": null
},
"context": null,
"origin": null,
"result": null,
"instrument": null,
"location": null,
"generator": null,
"featured": "object",
"data": null,
"tombstoned": [],
"redundant": false,
"missing_headline_template": null,
"missing_headline": null
}
],
"children_truncated": false,
"tombstoned": [],
"redundant": false,
"distinct_tombstoned": {
"actors": 0,
"objects": 0,
"targets": 0,
"contexts": 0,
"origins": 0,
"results": 0,
"instruments": 0,
"locations": 0,
"generators": 0,
"featured": 0
}
}
]count is the number of activities, and children holds the newest; members pages through the rest. See Group Items for every field.
These items also contain quoted text, bodies, and images. See Activity Content for their payloads and Blade, Vue, or React to display them.