Skip to content

docs: update v1.18 documentation#192

Open
goravel-coder wants to merge 10 commits into
masterfrom
bowen/v1.18
Open

docs: update v1.18 documentation#192
goravel-coder wants to merge 10 commits into
masterfrom
bowen/v1.18

Conversation

@goravel-coder

Copy link
Copy Markdown

Summary

  • Documents the v1.18 upgrade path and feature introductions for validation, collections, maintenance mode, build generation, ORM query context, package import aliases, and console tables.
  • Adds user-facing guidance for JWT guard mismatch handling and multiple-guard token parsing.
  • Adds sidebar entries so the new collections and v1.18 upgrade docs are discoverable.

Why

These docs align the English site with the v1.18 framework changes and give users one place to understand migration requirements and new APIs.

The validation examples show the new map[string]any rule format and string-slice rule values for regex patterns that contain pipes.

validator, err := ctx.Request().Validate(map[string]any{
	"title": "required|string|max:255",
	"slug":  []string{"required", "regex:^(news|docs)-[a-z]+$", "string"},
})
if err != nil {
	return ctx.Response().Json(http.StatusBadRequest, http.Json{"message": err.Error()})
}
if validator.Fails() {
	return ctx.Response().Json(http.StatusBadRequest, http.Json{"message": validator.Errors().All()})
}
validated := validator.Validated()
return ctx.Response().Success().Json(http.Json{"post": validated})

Comment thread en/upgrade/v1.18.md
A manual span looks like this:

```go
ctx, span := facades.Telemetry().Tracer("app").Start(ctx.Context(), "process-order")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krishankumar01 Could you explain what app is?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is scope of your trace ie who produced this trace. convention is the instrumenting package's import path (for app code, the app or package name.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add explanation about these in docs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's better, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants