*/ public function rules(): array { return [ 'installation_date' => ['required', 'date'], 'installation_days' => ['required', 'integer', 'min:1', 'max:365'], 'brigadier_id' => [ 'required', 'integer', Rule::exists('users', 'id')->where( fn (Builder $query): Builder => $query ->where('role', Role::BRIGADIER) ->whereNull('deleted_at'), ), ], 'note' => ['nullable', 'string', 'max:10000'], 'nav' => ['nullable', 'string', 'max:100'], ]; } /** @return array */ public function attributes(): array { return [ 'installation_date' => 'дата монтажа', 'installation_days' => 'количество дней монтажа', 'brigadier_id' => 'бригадир', ]; } }