WatchTube website / Content-managed product website / 2025
Scheduling website announcements through the content model.
The WatchTube website lets editors set an announcement's dates in Filament, then uses a Laravel query scope to decide what the public page should show.
- ROLE
- Laravel website implementation
- STATE OF THE BUILD
- Prototype
- RECORD UPDATED
THE WORK
The project.
The WatchTube website connects its editing tools to the content that Livewire renders, so changing an announcement doesn't mean editing a page template. Editors can enable it and set a start date, an end date or neither. A model query combines those fields when the page renders, giving scheduled content one visibility rule shared by the editing and display flow.
IMPLEMENTATION
Design choices.
- Visibility is calculated from the active switch and dates rather than saved as another field. An editor can change the schedule without also having to synchronize a separate visible flag.
- Nullable dates support an announcement that starts later, expires later or stays available without either limit. Placeholder dates aren't needed to represent those choices.
- The rule runs at render time. Keeping a page open across the start or end time doesn't itself trigger another query; a live refresh would need its own implementation.
HOW IT FITS TOGETHER
Architecture.
- Filament resources write the Eloquent models that Livewire pages read. The content stays in those records while Blade handles its presentation.
- Announcement::active() first requires the active switch, then checks both date limits against the current server time. A missing start or end leaves that side of the window open.
- HomePage calls the scope while gathering its hero, feature, FAQ, article and client content. The resulting announcements reach the template already selected, so the view doesn't need to repeat the scheduling conditions.
MADE WITH
PHP · Laravel 11 · Livewire 3 · Filament 3 · Blade
CHECKS & RESULTS
What was checked.
A source review shows what the code does. It is not a fresh test of the running app.
Code and development records reviewedReviewed
The code, tests and available development records were checked. Reported test results keep their original scope. No fresh app or live deployment check was run for this write-up.
- Scope of this check
- Code review, not a fresh run of the app
NEXT
Still to work through.
This record covers the content-managed website, not the separate WatchTube products. The scheduling path is supported by source and its implementation history; current deployment and live updates to an already-open page haven't been verified.