27 lines
521 B
PHP
27 lines
521 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\PageBlock;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/**
|
|
* @mixin PageBlock
|
|
*/
|
|
class PageBlockResource extends JsonResource
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'type' => $this->type,
|
|
'content' => $this->content,
|
|
'order_index' => $this->order_index,
|
|
];
|
|
}
|
|
}
|