Skip to content

Commit 3713b9e

Browse files
committed
fix: update text response
1 parent 539416c commit 3713b9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/docs/http/response.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ Also, Leaf's response object provides a clean and consistent API for creating re
5454

5555
## Plain text responses
5656

57-
Plain text responses can be created using the `text()` method. This method accepts 2 parameters:
57+
Plain text responses can be created using the `plain()` method. This method accepts 2 parameters:
5858

5959
- a string as text to output
6060
- an optional status code (defaults to 200/OK)
6161

6262
::: code-group
6363

6464
```php [Functional Mode]
65-
response()->text('Hello, world!');
65+
response()->plain('Hello, world!');
6666
```
6767

6868
```php [Leaf Instance]
69-
$app->response()->text('Hello, world!');
69+
$app->response()->plain('Hello, world!');
7070
```
7171

7272
:::

0 commit comments

Comments
 (0)