| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Http\Resources;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class IdentityVerificationResource extends JsonResource
- {
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'session_id' => $this->session_id,
- 'didit_status' => $this->didit_status,
- 'attempt' => $this->attempt,
- 'id_verification_status' => $this->id_verification_status,
- 'liveness_status' => $this->liveness_status,
- 'face_match_status' => $this->face_match_status,
- 'liveness_score' => $this->liveness_score,
- 'face_match_score' => $this->face_match_score,
- 'warnings' => $this->warnings,
- 'actionable_warnings' => $this->actionableWarnings(),
- 'reviewed_at' => $this->reviewed_at,
- 'review_comment' => $this->review_comment,
- 'started_at' => $this->started_at,
- 'completed_at' => $this->completed_at,
- 'user' => new UserResource($this->whenLoaded('user')),
- 'created_at' => $this->created_at,
- ];
- }
- }
|