2026-07-18 17:22:16 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
|
|
|
|
|
|
class PostResource extends JsonResource
|
|
|
|
|
{
|
|
|
|
|
public function toArray(Request $request): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'id' => $this->id,
|
|
|
|
|
'site_id' => $this->site_id,
|
|
|
|
|
'social_account_id' => $this->social_account_id,
|
|
|
|
|
'type' => $this->type,
|
|
|
|
|
'title' => $this->title,
|
|
|
|
|
'body' => $this->body,
|
2026-07-21 14:04:45 +03:00
|
|
|
'target' => $this->target,
|
2026-07-18 17:22:16 +03:00
|
|
|
'status' => $this->status,
|
|
|
|
|
'scheduled_at' => $this->scheduled_at,
|
2026-07-19 16:51:15 +03:00
|
|
|
'published_url' => $this->published_url,
|
2026-07-21 14:04:45 +03:00
|
|
|
'publish_error' => $this->publish_error,
|
2026-07-18 17:22:16 +03:00
|
|
|
'created_at' => $this->created_at,
|
|
|
|
|
'updated_at' => $this->updated_at,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|