Pre-1.0. Not intended for public use yet. The API is subject to undocumented change, and these pages may already be wrong about it.

Skip to content

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:

routes/web.php
php
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:

Erica Sinclair
Erica Sinclair placed 3 orders with Scoops Ahoy

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 ​

CallReturns
->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.

A controller, or wherever the feed is retrieved
php
use Storyfeed\Facades\Storyfeed;

Storyfeed::feed()->live()->get();

Today

Dustin Henderson
Dustin Henderson wrote Planck’s constant
Planck’s constant is 6.62607004.
Suzie, over Cerebro
Robin BuckleySteve Harrington
Robin BuckleySteve HarringtonErica SinclairDustin Henderson
Karen Wheeler
the Ferris wheel
the Ferris wheel
Murray Bauman
a hot dog
a hot dog
A
Alexei played a carnival game 3 times
Steve Harrington
3 activities
30 minutes ago
35 minutes ago
40 minutes ago
Joyce ByersJim Hopper
Joyce Byers, Jim Hopper, Alexei and 1 more checked in at the Fun Fair
Joyce ByersJim HopperAMurray Bauman
JT
Jasper Tey went on 3 rides at the Fun Fair
Robin BuckleyDustin Henderson
3 activities
48 minutes ago
49 minutes ago
50 minutes ago
Steve Harrington
Steve Harrington viewed 5 orders
Karen Wheeler
a bag of soft pretzels
a bag of soft pretzels
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Erica Sinclair
3 activities
57 minutes ago
58 minutes ago
59 minutes ago
Erica Sinclair
Erica Sinclair removed 2 parts from Service terms
LK
Erica Sinclair
Erica Sinclair accepted the proposal New shop
Erica Sinclair
Erica Sinclair
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Erica Sinclair
Erica Sinclair accepted the agreement Service terms
Erica Sinclair
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Karen Wheeler
Order #1042 items
and 2 moreOrder #1042
JT
a pretzel
a pretzel
JT
Jasper Tey checked in at the Fun Fair
Karen Wheeler
Steve Harrington
Steve Harrington noted Is that free for life, or only for today? at Scoops Ahoy
Is that free for life, or only for today?
Lucas Sinclair
the fireworks
the fireworks
Steve Harrington
Steve Harrington added 2 menu items
Max MayfieldLucas Sinclair
Max MayfieldLucas SinclairWBJBNWMWE
Jim Hopper
Murray Bauman
Murray Bauman wrote Murray’s gate investigation
Murray’s gate investigation

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.

LK
LK

Yesterday

Robin Buckley
Find where the elevator goes

Find out where the elevator in the storeroom goes down to.

TH
BL
JB
NW
Murray Bauman
Murray Bauman let the chief in at Murray's warehouse
Erica Sinclair
A
N
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Joyce Byers
Jim Hopper

Tuesday

Erica Sinclair
NW
WMax Mayfield
WBMax MayfieldLucas SinclairEMW
Erica Sinclair
Max MayfieldLucas Sinclair
Max MayfieldLucas SinclairMWDustin HendersonErica Sinclair
Erica Sinclair
Erica Sinclair placed 7 orders with Scoops Ahoy
Steve Harrington
Steve Harrington
Steve Harrington confirmed 3 orders
Steve Harrington
Erica SinclairRobin Buckley
Erica SinclairRobin BuckleySteve HarringtonDustin Henderson
Erica Sinclair
Erica Sinclair replied about Is that free for life, or only for today?
Steve Harrington
Steve Harrington
Steve Harrington
Steve Harrington confirmed 2 orders
Erica Sinclair
Is that free for life, or only for today?
Erica Sinclair
Erica Sinclair sent a note about Order #1035
Can I collect this at the counter?
Steve Harrington
Steve Harrington
Erica Sinclair
Erica Sinclair
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Steve Harrington
USS Butterscotch
USS Butterscotch
TH
Tom Holloway let Jonathan Byers go from the Hawkins Post

hawkins-post-internship-agreement.pdf PDF · 62 KB

TH
Tom Holloway let Nancy Wheeler go from the Hawkins Post

hawkins-post-internship-agreement.pdf PDF · 62 KB

Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Joyce Byers
Jim Hopper
Steve Harrington
2 activities
Tue 2 Jul, 9:05 AM

Starcourt Mall visitor guide

The visitor guide includes entrances, parking and shop locations.

Tue 2 Jul, 9:00 AM

Scoops Ahoy opening hours

The counter opens at 10 am. Orders are available until 9 pm.

Monday

Jim Hopper
Jim Hopper checked in at Hawkins Lab
Joyce Byers
Joyce Byers checked in at Hawkins Lab
JB
A fairground at night
A fairground at night
JT
Pull request #5
Title
Filter out the static
Branch
static-filter
Files changed
2
JT
Pull request #4
Title
Add a tape recorder input
Branch
tape-input
Files changed
4
Erica Sinclair
Robin Buckley
Map the code to the mall

Match each line of the message to a place in the mall.

Robin BuckleyDustin Henderson
Robin BuckleyDustin HendersonErica Sinclair
Erica Sinclair
Erica Sinclair placed 3 orders with Scoops Ahoy
SC
Ticket #101

Every magnet on the store display fell off at once, then did it again an hour later.

Max Mayfield
E

Sunday

Steve Harrington
Match the music to the mall

Pick out the mall in the sounds behind the message on the tape.

Robin Buckley
Crack the code

Work out what the Russian message on the tape is saying.

Jim Hopper
Jim Hopper checked in at Enzo's
Jim Hopper
Jim Hopper booked a table at Enzo's
BH
Jim Hopper
Max Mayfield
E
Eleven checked in at Starcourt Mall
Steve Harrington
Dustin Henderson
Dustin Henderson
JB
Jonathan Byers uploaded 4 photos to the Hawkins Post
Rolled newspapersA room lit redArcade machines in a dark room
TH
They came back every night for my fertilizer, bag after bag
Doris Driscoll
NW
They came back every night for my fertilizer, bag after bag
Doris Driscoll
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Joyce Byers
Ticket #101

Every magnet on the store display fell off at once, then did it again an hour later.

Joyce Byers
Ticket #101

Every magnet on the store display fell off at once, then did it again an hour later.

Saturday

DD
Doris Driscoll phoned the Hawkins Post about the rats
Dustin Henderson
Dustin Henderson wrote Cerebro reception log
Cerebro reception log
STATION: CEREBRO / WEATHERTOP
CALL TO UTAH .......... NO REPLY
UNEXPECTED SIGNAL .... VOICE / RUSSIAN
MESSAGE .............. REPEATING
NEXT STEP ............ KEEP THE TAPE
Karen Wheeler
BH
Dustin Henderson
Record the broadcast

Tape the Russian message Cerebro picked up on Weathertop.

Dustin Henderson
Dustin Henderson
Dustin Henderson
Max MayfieldLucas Sinclair
Max MayfieldLucas SinclairWBMWDustin Henderson
JT
cerebro
About
The radio built at camp, to reach Utah from Weathertop
Visibility
Public
Dustin Henderson

Friday

Joyce Byers
Ticket #102

The power went out across town this evening. It came back on its own a minute later.

Max MayfieldLucas Sinclair
Max MayfieldLucas SinclairMWWB
Robin Buckley
Steve Harrington
Steve Harrington served 2 orders
JT
Pull request #3
Title
Boost the range to reach Utah
Branch
utah-range
Files changed
2
JT
Pull request #2
Title
Wire up the transmitter
Branch
transmitter
Files changed
5
JT
Pull request #1
Title
Add the antenna mount
Branch
antenna-mount
Files changed
3
Dustin Henderson
cerebro
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.

A controller, or wherever the feed is retrieved
php
use Storyfeed\Facades\Storyfeed;

Storyfeed::feed()->log()->get();

Today

Dustin Henderson
Dustin Henderson wrote Planck’s constant
Planck’s constant is 6.62607004.
Suzie, over Cerebro
Robin Buckley
Steve Harrington
Erica Sinclair
Dustin Henderson
Karen Wheeler
the Ferris wheel
the Ferris wheel
Murray Bauman
a hot dog
a hot dog
A
Steve Harrington
A
A
Steve Harrington
Joyce Byers
Jim Hopper
Jim Hopper checked in at the Fun Fair
A
Alexei checked in at the Fun Fair
Steve Harrington
Murray Bauman
JT
Robin Buckley
Dustin Henderson
Erica Sinclair
Steve Harrington
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Karen Wheeler
a bag of soft pretzels
a bag of soft pretzels
Steve Harrington
JT
the carousel
the carousel
Erica Sinclair
Erica Sinclair
Erica Sinclair
Karen Wheeler
Order #1042 items
and 2 moreOrder #1042
Erica Sinclair
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Erica Sinclair
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Erica Sinclair
Erica Sinclair removed an attachment from Service terms
Erica Sinclair
Erica Sinclair removed a clause from Service terms
Erica Sinclair
Erica Sinclair
Erica Sinclair accepted the proposal New shop
Erica Sinclair
Erica Sinclair accepted the agreement Service terms
LK
Steve Harrington
JT
Steve Harrington
JT
a pretzel
a pretzel
Steve Harrington
JT
Jasper Tey checked in at the Fun Fair
Karen Wheeler
Steve Harrington
Steve Harrington noted Is that free for life, or only for today? at Scoops Ahoy
Is that free for life, or only for today?
Lucas Sinclair
the fireworks
the fireworks
Steve Harrington
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Max Mayfield
Lucas Sinclair
WB
JB
NW
MW
E
Eleven checked in at the Hopper cabin
Jim Hopper
Murray Bauman
Murray Bauman wrote Murray’s gate investigation
Murray’s gate investigation

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.

LK
LK

Yesterday

Robin Buckley
Find where the elevator goes

Find out where the elevator in the storeroom goes down to.

TH
BL
JB
NW
Murray Bauman
Murray Bauman let the chief in at Murray's warehouse
Erica Sinclair
A
N
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Joyce Byers
Jim Hopper

Tuesday

Erica Sinclair
Open the loading bay door

Unlock the storeroom door from the inside so the others can get in.

Erica Sinclair
Get through the air ducts

Crawl through the ducts into the locked storeroom.

NW
WB
Max Mayfield
Lucas Sinclair
E
MW
Erica Sinclair
Max Mayfield
Lucas Sinclair
MW
Dustin Henderson
Erica Sinclair
Steve Harrington
Erica Sinclair
Steve Harrington
Steve Harrington
Steve Harrington
Erica Sinclair
Steve Harrington
Erica Sinclair
Erica Sinclair
Robin Buckley
Steve Harrington
Erica Sinclair
Erica Sinclair
Erica Sinclair replied about Is that free for life, or only for today?
Dustin Henderson
Steve Harrington
Steve Harrington
Steve Harrington
Order #2081

Pickup at 12:15 PM

  1. Placed
  2. Confirmed
  3. Ready
Erica Sinclair
Is that free for life, or only for today?
Erica Sinclair
Erica Sinclair sent a note about Order #1035
Can I collect this at the counter?
Steve Harrington
Erica Sinclair
Erica Sinclair
Erica Sinclair
Steve Harrington
Steve Harrington
Erica Sinclair
Erica Sinclair
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Steve Harrington
USS Butterscotch
USS Butterscotch
TH
Tom Holloway let Jonathan Byers go from the Hawkins Post

hawkins-post-internship-agreement.pdf PDF · 62 KB

Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
TH
Tom Holloway let Nancy Wheeler go from the Hawkins Post

hawkins-post-internship-agreement.pdf PDF · 62 KB

Joyce Byers
Jim Hopper
Steve Harrington

Starcourt Mall visitor guide

The visitor guide includes entrances, parking and shop locations.

Steve Harrington

Scoops Ahoy opening hours

The counter opens at 10 am. Orders are available until 9 pm.

Monday

Jim Hopper
Jim Hopper checked in at Hawkins Lab
Joyce Byers
Joyce Byers checked in at Hawkins Lab
JB
A fairground at night
A fairground at night
JT
Pull request #5
Title
Filter out the static
Branch
static-filter
Files changed
2
JT
Pull request #4
Title
Add a tape recorder input
Branch
tape-input
Files changed
4
Erica Sinclair
Robin Buckley
Map the code to the mall

Match each line of the message to a place in the mall.

Robin Buckley
Dustin Henderson
Erica Sinclair
Erica Sinclair
Erica Sinclair
Erica Sinclair
SC
Ticket #101

Every magnet on the store display fell off at once, then did it again an hour later.

Max Mayfield
E

Sunday

Steve Harrington
Match the music to the mall

Pick out the mall in the sounds behind the message on the tape.

Robin Buckley
Crack the code

Work out what the Russian message on the tape is saying.

Jim Hopper
Jim Hopper checked in at Enzo's
Jim Hopper
Jim Hopper booked a table at Enzo's
BH
Jim Hopper
Max Mayfield
E
Eleven checked in at Starcourt Mall
Steve Harrington
Dustin Henderson
Dustin Henderson
JB
Rolled newspapers
Rolled newspapers
JB
A room lit red
A room lit red
JB
Arcade machines in a dark room
Arcade machines in a dark room
JB
A small-town street from above
A small-town street from above
TH
They came back every night for my fertilizer, bag after bag
Doris Driscoll
NW
They came back every night for my fertilizer, bag after bag
Doris Driscoll
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Steve Harrington
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
Joyce Byers
Ticket #101

Every magnet on the store display fell off at once, then did it again an hour later.

Joyce Byers
Ticket #101

Every magnet on the store display fell off at once, then did it again an hour later.

Saturday

DD
Doris Driscoll phoned the Hawkins Post about the rats
Dustin Henderson
Dustin Henderson wrote Cerebro reception log
Cerebro reception log
STATION: CEREBRO / WEATHERTOP
CALL TO UTAH .......... NO REPLY
UNEXPECTED SIGNAL .... VOICE / RUSSIAN
MESSAGE .............. REPEATING
NEXT STEP ............ KEEP THE TAPE
Karen Wheeler
BH
Dustin Henderson
Record the broadcast

Tape the Russian message Cerebro picked up on Weathertop.

Dustin Henderson
Dustin Henderson
Dustin Henderson
Max Mayfield
Max Mayfield checked in at Weathertop
Lucas Sinclair
WB
Will Byers checked in at Weathertop
MW
Mike Wheeler checked in at Weathertop
Dustin Henderson
JT
cerebro
About
The radio built at camp, to reach Utah from Weathertop
Visibility
Public
Dustin Henderson

Friday

Joyce Byers
Ticket #102

The power went out across town this evening. It came back on its own a minute later.

Max Mayfield
Day of the Dead
Director
George A. Romero
Showing
Sneak preview
Lucas Sinclair
Day of the Dead
Director
George A. Romero
Showing
Sneak preview
WB
Day of the Dead
Director
George A. Romero
Showing
Sneak preview
MW
Day of the Dead
Director
George A. Romero
Showing
Sneak preview
Robin Buckley
Steve Harrington
Steve Harrington
JT
Pull request #3
Title
Boost the range to reach Utah
Branch
utah-range
Files changed
2
JT
Pull request #2
Title
Wire up the transmitter
Branch
transmitter
Files changed
5
JT
Pull request #1
Title
Add the antenna mount
Branch
antenna-mount
Files changed
3
Dustin Henderson
cerebro
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

Robin Buckley
Dustin Henderson
Erica Sinclair
Steve Harrington
Steve Harrington noted Is that free for life, or only for today? at Scoops Ahoy
Is that free for life, or only for today?

Tuesday

Erica Sinclair
Steve Harrington
Steve Harrington
Erica Sinclair
Is that free for life, or only for today?
Erica Sinclair

Sunday

Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
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:

routes/web.php
php
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:

Erica Sinclair
Steve Harrington
Steve Harrington
Erica Sinclair

Inside that route, the model provides the same query:

routes/web.phporder feed route
php
// Retrieve the same activities through the model.
return $order->storyfeed()->get();
Erica Sinclair
Steve Harrington
Steve Harrington
Erica Sinclair

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:

CallReturns
->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:

A controller, or wherever the feed is retrieved
php
use Storyfeed\Facades\Storyfeed;

Storyfeed::feed()->verb('place')->get();
Erica Sinclair
Erica Sinclair
A controller, or wherever the feed is retrieved
php
use Storyfeed\Facades\Storyfeed;

Storyfeed::feed()->only(['place', 'ready'])->get();
Erica Sinclair
Steve Harrington
Erica Sinclair
A controller, or wherever the feed is retrieved
php
use App\Enums\OrderActivity;
use Storyfeed\Facades\Storyfeed;

Storyfeed::feed()->only(['re*', OrderActivity::Confirmed])->get();

This matches ready, reprice and confirm in the sample:

Steve Harrington
Steve Harrington
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
A controller, or wherever the feed is retrieved
php
use Storyfeed\Facades\Storyfeed;

Storyfeed::feed()->except(['note'])->get();

The note is omitted; the other activities remain:

Robin BuckleyDustin Henderson
3 activities
48 minutes ago
49 minutes ago
50 minutes ago
Erica Sinclair
Steve Harrington
Steve Harrington
Erica Sinclair
Is that free for life, or only for today?
Erica Sinclair
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
Price
$2.95
Section
Sundaes
Available
At the counter
Orders
12
InputBehaviour
a listaccepts verb strings and enum cases together
re*matches verbs starting with re
an unrecognised verbmatches no activities unless that verb has been recorded; does not throw
only([]) or except([])throws an exception
repeated only() / except() callsactivities must match every accumulated filter
repeated verb() callsthe 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:

routes/web.php
php
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:

Robin BuckleyDustin Henderson
3 activities
48 minutes ago
49 minutes ago
50 minutes ago
Erica Sinclair
Steve Harrington
Erica Sinclair

To limit that route to activities published since 5 pm, replace its return expression with:

routes/web.phpshop feed route
php
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:

Robin BuckleyDustin Henderson
3 activities
48 minutes ago
49 minutes ago
50 minutes ago

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:

routes/web.php
php
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:

Robin BuckleyDustin Henderson
3 activities
48 minutes ago
49 minutes ago
50 minutes ago
Steve Harrington
Steve Harrington noted Is that free for life, or only for today? at Scoops Ahoy
Is that free for life, or only for today?
Erica Sinclair
Steve Harrington
Erica Sinclair

Without shop, the query returns the whole sample:

Robin BuckleyDustin Henderson
3 activities
48 minutes ago
49 minutes ago
50 minutes ago
Steve Harrington
Steve Harrington noted Is that free for life, or only for today? at Scoops Ahoy
Is that free for life, or only for today?
Erica Sinclair
Steve Harrington
Steve Harrington
Erica Sinclair
Is that free for life, or only for today?
Erica Sinclair
Steve Harrington
Steve Harrington changed the price of USS Butterscotch
USS Butterscotch
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:

routes/web.php
php
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:

resources/views/feed.blade.php
blade
@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:

Erica Sinclair
Erica Sinclair

Follow $page->nextPageUrl() to retrieve the remaining placement:

Erica Sinclair

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:

A controller, or wherever the feed is retrieved
php
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:

A controller, or wherever the feed is retrieved
php
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:

routes/web.php
php
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.

routes/web.php
php
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"
}
KeyPage OneNext Page
datathe two newest placementsthe remaining placement
next_cursoran opaque stringnull
next_page_urlthe URL containing that cursornull
prev_cursornullan opaque cursor towards the newer page
prev_page_urlnullthe URL containing that cursor
payload_version11
sync_tokenthe feed's token, or nullthe 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:

A job or a command
php
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:

KeyUsage
next_cursorpass as ?cursor= to retrieve the next page; null on the last page
sync_tokenif 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:

routes/web.php
php
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:

Erica Sinclair
Erica Sinclair placed 3 orders with Scoops Ahoy
[
  {
    "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.

Released under the MIT License.