Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Service/app/Http/Requests/ServiceRequest.php
Назад
<?php namespace Modules\Service\app\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Auth; class ServiceRequest extends FormRequest { public function authorize(): bool { return (Auth::guard('admin')->check() && checkAdminHasPermission('service.update')) ? true : false; } public function rules(): array { $languages = allLanguages(); $rules = [ 'title' => 'required|string|max:255', 'description' => 'required', ]; if ($this->isMethod('put')) { $rules['icon'] = $this->code == $languages->first()->code ? 'required':''; } if ($this->isMethod('post')) { $rules['icon'] = 'required'; } return $rules; } public function messages(): array { return [ 'title.required' => __('The title field is required.'), 'title.string' => __('The title must be a string.'), 'title.max' => __('The title may not be greater than 255 characters.'), 'icon.required' => __('The icon field is required.'), 'description.required' => __('The description field is required.'), ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0.3 |
proxy
|
phpinfo
|
Настройка