ورود | ثبت نام
  • FA
  • EN

API Docs

Post Resource

Represents a post entity, including its profile association, content, and draft status.


Schema

FieldTypeDescription
idintUnique identifier for the post
profile_typestringType of the profile (e.g., App\\Models\\User)
profile_idintID of the profile the post belongs to
titlestringTitle of the post
contentstringContent of the post
is_draftboolWhether the post is a draft
created_atDatetimeWhen the post is created
updated_atDatetimeWhen the post last updated
mediaMedia Resource[]List of media items (see here)

Example

{
  "id": 123,
  "profile_type": "App\\Models\\User",
  "profile_id": 42,
  "title": "My Workout",
  "content": "Did squats and deadlifts.",
  "is_draft": false,
  "created_at": "2020-01-01 00:00:00",
  "updated_at": "2020-03-01 00:00:00",
  "media": [
    {
      "id": 10,
      "attachable_type": "App\\Models\\Posts\\Post",
      "attachable_id": 123,
      "link": "https://example.com/media/10.jpg"
    }
  ],
}

Related Resources

footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutubeTelegram