File manager - Edit - /var/www/html/spdc/api/app/Http/Requests/FieldRequest.php
Back
<?php namespace App\Http\Requests; use App\Models\Field; use App\Rules\ArrayInput; use App\Rules\BooleanInput; use Illuminate\Foundation\Http\FormRequest; class FieldRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, mixed> */ public function rules() { $systemItemTypes = implode(', ', Field::SYSTEM_ITEM_TYPES); return [ 'label' => ['required', 'max:255'], 'type' => ['required', 'max:255'], 'title' => ['nullable', 'max:255'], 'description' => ['nullable', 'max:255'], 'multiple' => ['nullable', new BooleanInput], 'options' => ['nullable', new ArrayInput], 'system_item' => ['nullable', new BooleanInput], 'system_item_type' => ['required_if:system_item,true', "in:$systemItemTypes"], 'must_be_updated' => ['nullable', new BooleanInput], 'validations' => ['nullable', new ArrayInput], 'validations.*' => ['exists:validations,id'] ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings