Spaces:
Running
Running
Download app/Http/Requests/SwapPlanRequest.php from Ailixir-AI-Team/ailixir-api: direct link, hf CLI and curl.
- Browser
- Download file 572 Bytes
-
https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/f0dbfedd4517c01e2ac52ad175f104f22391223d/app/Http/Requests/SwapPlanRequest.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api@f0dbfedd4517c01e2ac52ad175f104f22391223d/app/Http/Requests/SwapPlanRequest.php
-
curl -L -o SwapPlanRequest.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/f0dbfedd4517c01e2ac52ad175f104f22391223d/app/Http/Requests/SwapPlanRequest.php
572 Bytes
| namespace App\Http\Requests; | |
| use Illuminate\Foundation\Http\FormRequest; | |
| class SwapPlanRequest extends FormRequest | |
| { | |
| public function authorize(): bool | |
| { | |
| return true; | |
| } | |
| public function rules(): array | |
| { | |
| return [ | |
| 'plan_id' => ['required', 'integer', 'exists:plans,id', 'different:current_plan_id'], | |
| ]; | |
| } | |
| public function messages(): array | |
| { | |
| return [ | |
| 'plan_id.required' => 'Plan is required.', | |
| 'plan_id.exists' => 'Selected plan does not exist.', | |
| ]; | |
| } | |
| } | |