Файловый менеджер - Редактировать - /home/clickysoft/public_html/assets.clickysoft.net/app/Http/Requests/UpdateUserRequest.php
Назад
<?php namespace App\Http\Requests; use Gate; use Illuminate\Foundation\Http\FormRequest; class UpdateUserRequest extends FormRequest { public function authorize() { return Gate::allows('user_edit'); } public function rules() { $user = $this->route('user'); return [ 'companies' => [ 'required', 'array', ], 'companies.*.company_id' => [ 'integer', 'exists:companies,id,organization_id,' . auth()->user()->organization_id, ], 'companies.*.branch_id' => [ 'required', 'integer', 'exists:branches,id,organization_id,' . auth()->user()->organization_id, ], 'first_name' => [ 'string', 'required', ], 'email' => [ 'required', 'unique:users,email,' . $user->id, ], 'password' => [ 'nullable', ], 'contact_number' => [ 'nullable', 'string', 'min:10', 'max:12', ], 'user_type' => [ 'required', 'in:employee,vendor', ], 'roles' => [ 'required', 'array', ], 'roles.*' => [ 'integer', 'exists:roles,id,organization_id,' . auth()->user()->organization_id, ], ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка