Represents a post entity, including its profile association, content, and draft status.
Field | Type | Description |
---|---|---|
id | int | Unique identifier for the post |
profile_type | string | Type of the profile (e.g., App\\Models\\User ) |
profile_id | int | ID of the profile the post belongs to |
title | string | Title of the post |
content | string | Content of the post |
is_draft | bool | Whether the post is a draft |
media | Media Resource[] | List of media items (see here) |
{
"id": 123,
"profile_type": "App\\Models\\User",
"profile_id": 42,
"title": "My Workout",
"content": "Did squats and deadlifts.",
"is_draft": false,
"media": [
{
"id": 10,
"attachable_type": "App\\Models\\Posts\\Post",
"attachable_id": 123,
"link": "https://example.com/media/10.jpg"
}
],
}