ApprovalGroupSimpleResource.php 541 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Created by IntelliJ IDEA.
  4. * User: kelyliang
  5. * Date: 2024/7/29
  6. * Time: 上午 10:35
  7. */
  8. namespace App\Http\Resources\API;
  9. use Illuminate\Http\Request;
  10. use Illuminate\Http\Resources\Json\JsonResource;
  11. class ApprovalGroupSimpleResource extends JsonResource
  12. {
  13. /**
  14. * Transform the resource into an array.
  15. *
  16. * @return array<string, mixed>
  17. */
  18. public function toArray(Request $request): array
  19. {
  20. return [
  21. 'id' => $this->id,
  22. 'name' => $this->name,
  23. ];
  24. }
  25. }