$input * * @throws ValidationException */ public function update(ServerLog $serverLog, array $input): void { Validator::make($input, self::rules())->validate(); $serverLog->update([ 'name' => $input['path'], ]); } /** * @return array */ public static function rules(): array { return [ 'path' => 'required', ]; } }