Files
muninn/app/Http/Resources/PostResource.php
T

29 lines
823 B
PHP
Raw Normal View History

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,
'target' => $this->target,
2026-07-18 17:22:16 +03:00
'status' => $this->status,
'scheduled_at' => $this->scheduled_at,
'published_url' => $this->published_url,
'publish_error' => $this->publish_error,
2026-07-18 17:22:16 +03:00
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}