WebsitePost
A WebsitePost is an article published on the marketing website, mirrored into the application so it can be shown to users.
Purpose
Section titled “Purpose”The dashboard and investor pages surface recent posts from the public site. Each row holds the display metadata — title, excerpt, read time, cover image and the external URL to open — rather than the article body, which stays on the website. The cover image may come from an uploaded Attachment or from a plain URI, and the image_url accessor prefers the attachment.
Posts are managed by staff and read on a couple of authenticated pages.
app/Http/Controllers/Dashboard/DashboardIndexController.php— the news panel on the dashboard.app/Http/Controllers/Investors/InvestorsController.php— the investor page feed.app/Filament/Resources/WebsitePostResource.php— staff creation and editing.scopePublished()— filters tostatus = 'published'; call it on any user-facing query.
Relationships
Section titled “Relationships”| Relation | Type | Related model |
|---|---|---|
image |
belongsTo |
Attachment |
Data shape
Section titled “Data shape”Table website_posts. Primary key is a UUID (HasUuids).
| Column | Type | Notes |
|---|---|---|
id |
uuid |
Primary key |
title |
string |
Article headline |
excerpt |
text |
Nullable summary |
timestamp |
string |
Cast for display as d.m.Y |
read_time |
string |
Free text, e.g. “4 min read” |
image_id |
uuid |
Nullable, FK to attachments |
image_uri |
string |
Nullable fallback image URL |
url |
string |
Link to the article on the website |
slug |
string |
Article slug |
status |
string |
Defaults to published |
created_at, updated_at |
datetime |
Timestamps |
image_url is appended to the model’s array form via $appends. It resolves to the attachment’s URL, falling back to image_uri, and is null when neither is set.