12345678910111213141516171819202122232425262728 |
- <?php
- namespace App\Http\Resources\API;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class CustomFieldResource extends JsonResource
- {
- /**
- * Transform the resource into an array.
- *
- * @return array<string, mixed>
- */
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'key' => $this->key,
- 'group' => $this->group,
- 'label' => $this->label,
- 'options' => $this->options,
- 'type' => $this->type,
- 'required' => $this->required,
- 'remark' => $this->remark,
- ];
- }
- }
|