Each date answers a different question
An announcement doesn't always need a complete date range. It might need to appear from a particular day, disappear after one, or remain available until an editor switches it off. The WatchTube model represents those choices with an active flag and two nullable dates.
The active scope requires the flag first. It then accepts a start that is missing or no later than now, and an end that is missing or no earlier than now. Each null check is grouped with its own comparison, and both groups must pass. A missing start therefore doesn't bypass an expired end.
Select the content before rendering it
HomePage calls Announcement::active() while assembling its render data. Blade receives the selected records rather than deciding which announcements are eligible. The September 2025 change added the model, migration, Filament resource and page integration together, connecting the editor's fields to the public query.
This is a render-time decision, not a background notification. A page that's already open won't change just because the server clock crosses a date limit. Refreshing that view automatically would be separate work.
Announcement visibility selection
The editor supplies state and optional bounds; the home-page query derives the current result.
Editorial inputs
Model query
Page output
Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.
Choose a component to explore
Select a numbered component on the map or use the component menu. Its details and connections will appear here.
No component selected.
All connections (5)
- 01 · Filament editor → 02 · Announcement recordsave fields · Direct call
- 03 · Home-page render → 04 · Active query scopequery · Direct call
- 02 · Announcement record → 04 · Active query scopestate and bounds · Direct call
- 04 · Active query scope → 05 · Eligible announcementseligible · Direct call
- 04 · Active query scope → 06 · Excluded from this resultoutside window · Blocked / denied