File manager - Edit - /var/www/html/portalHomolog/app/Http/Requests/ContratoArquivoRequest.php
Back
<?php namespace App\Http\Requests; use App\Helpers\FileUploadHelper; use Illuminate\Foundation\Http\FormRequest; class ContratoArquivoRequest extends FormRequest { public function authorize(): bool { return true; } public function rules(): array { $arquivoRule = $this->isMethod('PUT') ? 'nullable' : 'required'; $mimes = implode(',', FileUploadHelper::ALLOWED_GENERAL_EXTENSIONS); return [ 'arquivo' => [$arquivoRule, 'file', "mimes:{$mimes}", 'max:10240'], 'arq_numero' => ['nullable', 'string', 'max:50'], 'arq_titulo' => ['nullable', 'string', 'max:200'], 'arq_dataini' => ['nullable', 'string', 'max:10'], 'arq_datafim' => ['nullable', 'string', 'max:10'], ]; } public function messages(): array { return [ 'arquivo.required' => __('* O arquivo é obrigatório.'), 'arquivo.file' => __('* O campo deve ser um arquivo válido.'), 'arquivo.mimes' => __('* Formato de arquivo não permitido.'), 'arquivo.max' => __('* O arquivo não pode ultrapassar 10 MB.'), 'arq_numero.max' => __('* O número não pode ultrapassar 50 caracteres.'), 'arq_titulo.max' => __('* O título não pode ultrapassar 200 caracteres.'), 'arq_dataini.max' => __('* A data inicial não pode ultrapassar 10 caracteres.'), 'arq_datafim.max' => __('* A data final não pode ultrapassar 10 caracteres.'), ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings