Skip to content

Commit be83494

Browse files
committed
Update README.md and settings comments
1 parent c5c8c42 commit be83494

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Every page in your javascript application is backed by a Twig template which ret
5656
{{ inertia('Posts/Index', { posts: posts }) }}
5757
```
5858

59-
Note: templates are passed `element` variables automatically when a request is matched to an element. If you want to pass the element as a prop automatically to your page component, set the `injectElementAsProp` configuration to `true`.
59+
Note: templates are passed element variables (`entry` or `category`) automatically when the route is matched to either element type. If you want to pass the element as a prop automatically to your page component, set the `injectElementAsProp` configuration to `true`.
6060

6161
## Shared Data
6262

@@ -187,7 +187,7 @@ return [
187187
],
188188

189189
/**
190-
* Whether to inject the element matched from routing automatically into the application
190+
* Whether to inject the route matched element (`entry` or `category`) automatically into the application
191191
*/
192192
'injectElementAsProp' => false,
193193

src/models/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Settings extends Model
3333
public array $assetsDirs = ['@webroot/assets'];
3434

3535
/**
36-
* Whether to inject the element automatically into the frontend response
36+
* Whether to inject the element (`entry` or `category`) automatically into the frontend response
3737
* @var bool
3838
*/
3939
public bool $injectElementAsProp = false;

0 commit comments

Comments
 (0)