Skip to content

Commit fb31ec7

Browse files
committed
fix: update template docs
1 parent 006cd52 commit fb31ec7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/docs/frontend/inertia.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,18 @@ You can find more information on using Inertia with your frontend framework in t
123123
Leaf MVC makes your life easier by providing a command to generate views for you. You can use the `g:template` command to generate a new Inertia view:
124124

125125
```bash:no-line-numbers
126-
php leaf g:template Home --jsx # React
127-
php leaf g:template Home --vue # Vue
128-
php leaf g:template Home --svelte # Svelte
126+
php leaf g:template home --type=jsx # React
127+
php leaf g:template home --type=vue # Vue
128+
php leaf g:template home --type=svelte # Svelte
129129
php leaf g:template home # Blade
130130
```
131131

132-
You can also specify the directory where you want the view to be generated:
132+
By default, React, Vue and Svelte views are generated in the `app/views/js` directory, while Blade views are generated in the `app/views` directory. You can further specify the directory where you want the view to be generated:
133133

134134
```bash:no-line-numbers
135-
php leaf g:template Home --jsx --dir=components
135+
php leaf g:template Components/Home --type=jsx # app/views/js/Components/Home.jsx
136+
php leaf g:template Layout/Home --type=vue # app/views/js/Layout/Home.vue
137+
php leaf g:template pages/Home # app/views/pages/Home.view.php
136138
```
137139

138140
## Manually setting up inertia

0 commit comments

Comments
 (0)