26 lines
678 B
PHP
26 lines
678 B
PHP
<?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,
|
||
|
|
'status' => $this->status,
|
||
|
|
'scheduled_at' => $this->scheduled_at,
|
||
|
|
'created_at' => $this->created_at,
|
||
|
|
'updated_at' => $this->updated_at,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|