Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/app/Http/Requests/Landlord/UpdateProfileRequest.php
Назад
<?php namespace App\Http\Requests\Landlord; use Illuminate\Foundation\Http\FormRequest; class UpdateProfileRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string> */ public function rules(): array { return [ 'mailing_address' => [ 'email:rfc,dns', 'nullable', ], 'name' => [ 'required', 'string', ], 'phone_number' => [ 'string', 'nullable', 'min:6' ], 'company_phoner' => [ 'string', 'nullable', 'min:6' ], 'bio' => [ 'string', 'nullable', ], 'profile_image' => [ 'image', 'mimes:jpeg,png,jpg,JPEG,PNG,JPG', 'nullable', ], ]; } /** * Get the error messages for the defined validation rules. * * @return array */ public function messages() { return [ 'name.required' => 'The :attribute field is required', 'name.alpha' => 'The :attribute must contain only alphabets', 'password.regex' => 'The :attribute must include an upper case and lower case char', 'password.min' => 'The :attribute should have at least 8 characters', 'phone_number.min' => 'The :attribute should have at least 6 characters', 'phone_number.max' => 'The :attribute should have at least 12 characters', ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes() { return [ 'name' => 'Name', 'phone_number' => 'Phone Number', 'company_phone' => 'Company Phone', 'bio' => 'Bio', 'mailing_address' => auth()->user()->isTenant ? 'Secondary Email' : 'Mailing Address', 'profile_image' => 'Profile Image', ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка