File manager - Edit - /var/www/html/homologBancodetalentos/app/Http/Requests/TalentBank/JobRequest.php
Back
<?php namespace App\Http\Requests\TalentBank; use Illuminate\Foundation\Http\FormRequest; class JobRequest extends FormRequest { public function authorize(): bool { return true; } protected function prepareForValidation(): void { if ($this->has('descripton')) { $this->merge(['description' => $this->input('descripton')]); } } public function rules(): array { if ($this->method() == 'PUT' || $this->method() == 'PATCH') { return [ 'spots_total' => 'nullable|integer', 'spots_filled' => 'nullable|integer', 'descripton' => 'nullable|string', 'description' => 'nullable|string', 'requirements_mandatory' => 'nullable|string', 'requirements_optional' => 'nullable|string', 'benefits' => 'nullable|string', 'misc_info' => 'nullable|string', 'hide_company' => 'nullable|boolean', 'is_hiring' => 'nullable|boolean', 'occupation_id' => 'nullable|integer|exists:occupations,id', 'salary_range_id' => 'nullable|integer|exists:salary_ranges,id', 'contract_type_id' => 'nullable|integer|exists:contract_types,id', 'neighbourhood_id' => 'nullable|integer|exists:neighbourhoods,id', 'expertise_level_id' => 'nullable|integer|exists:expertise_levels,id', 'modality_id' => 'nullable|integer|exists:modalities,id', 'workload_id' => 'nullable|integer|exists:workloads,id', ]; } return [ 'spots_total' => 'required|integer', 'spots_filled' => 'integer', 'descripton' => 'required|string', 'requirements_mandatory' => 'string', 'requirements_optional' => 'string', 'benefits' => 'string', 'misc_info' => 'string', 'hide_company' => 'required|boolean', 'is_hiring' => 'required|boolean', 'occupation_id' => 'required|integer|exists:occupations,id', 'salary_range_id' => 'required|integer|exists:salary_ranges,id', 'contract_type_id' => 'required|integer|exists:contract_types,id', 'neighbourhood_id' => 'integer|exists:neighbourhoods,id', 'expertise_level_id' => 'integer|exists:expertise_levels,id', 'modality_id' => 'integer|exists:modalities,id', 'workload_id' => 'integer|exists:workloads,id', ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings