21 lines
564 B
PHP
21 lines
564 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Settings;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class PolicyResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'type' => $this->resource['type'] ?? null,
|
|
'title' => $this->resource['title'] ?? null,
|
|
'format' => $this->resource['format'] ?? 'html',
|
|
'content' => $this->resource['content'] ?? '',
|
|
'updated_at' => $this->resource['updated_at'] ?? null,
|
|
];
|
|
}
|
|
}
|