Spaces:
Running
Running
Download app/Http/Resources/ChemistryResponseResource.php from Ailixir-AI-Team/ailixir-api: direct link, hf CLI and curl.
- Browser
- Download file 460 Bytes
-
https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/main/app/Http/Resources/ChemistryResponseResource.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api/app/Http/Resources/ChemistryResponseResource.php
-
curl -L -o ChemistryResponseResource.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/main/app/Http/Resources/ChemistryResponseResource.php
460 Bytes
| namespace App\Http\Resources; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Http\Resources\Json\JsonResource; | |
| class ChemistryResponseResource extends JsonResource | |
| { | |
| public function toArray(Request $request): array | |
| { | |
| return [ | |
| 'success' => $this['success'] ?? false, | |
| 'data' => $this['data'] ?? null, | |
| 'status' => $this['status'] ?? null, | |
| 'error' => $this['error'] ?? null, | |
| ]; | |
| } | |
| } | |