Skip to content

Commit 43a416d

Browse files
authored
Namespace folio make command (laravel#9510)
1 parent 86518f9 commit 43a416d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

folio.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ php artisan folio:list
109109
You may create a nested route by creating one or more directories within one of Folio's directories. For instance, to create a page that is accessible via `/user/profile`, create a `profile.blade.php` template within the `pages/user` directory:
110110

111111
```bash
112-
php artisan make:folio user/profile
112+
php artisan folio:page user/profile
113113

114114
# pages/user/profile.blade.php → /user/profile
115115
```
@@ -120,10 +120,10 @@ php artisan make:folio user/profile
120120
Sometimes, you may wish to make a given page the "index" of a directory. By placing an `index.blade.php` template within a Folio directory, any requests to the root of that directory will be routed to that page:
121121

122122
```bash
123-
php artisan make:folio index
123+
php artisan folio:page index
124124
# pages/index.blade.php → /
125125

126-
php artisan make:folio users/index
126+
php artisan folio:page users/index
127127
# pages/users/index.blade.php → /users
128128
```
129129

@@ -133,7 +133,7 @@ php artisan make:folio users/index
133133
Often, you will need to have segments of the incoming request's URL injected into your page so that you can interact with them. For example, you may need to access the "ID" of the user whose profile is being displayed. To accomplish this, you may encapsulate a segment of the page's filename in square brackets:
134134

135135
```bash
136-
php artisan make:folio "users/[id]"
136+
php artisan folio:page "users/[id]"
137137

138138
# pages/users/[id].blade.php → /users/1
139139
```
@@ -149,7 +149,7 @@ Captured segments can be accessed as variables within your Blade template:
149149
To capture multiple segments, you can prefix the encapsulated segment with three dots `...`:
150150

151151
```bash
152-
php artisan make:folio "users/[...ids]"
152+
php artisan folio:page "users/[...ids]"
153153

154154
# pages/users/[...ids].blade.php → /users/1/2/3
155155
```
@@ -170,7 +170,7 @@ When capturing multiple segments, the captured segments will be injected into th
170170
If a wildcard segment of your page template's filename corresponds one of your application's Eloquent models, Folio will automatically take advantage of Laravel's route model binding capabilities and attempt to inject the resolved model instance into your page:
171171

172172
```bash
173-
php artisan make:folio "users/[User]"
173+
php artisan folio:page "users/[User]"
174174

175175
# pages/users/[User].blade.php → /users/1
176176
```
@@ -194,7 +194,7 @@ On Windows, you should use `-` to separate the model name from the key: `[Post-s
194194
By default, Folio will search for your model within your application's `app/Models` directory. However, if needed, you may specify the fully-qualified model class name in your template's filename:
195195

196196
```bash
197-
php artisan make:folio "users/[.App.Models.User]"
197+
php artisan folio:page "users/[.App.Models.User]"
198198

199199
# pages/users/[.App.Models.User].blade.php → /users/1
200200
```

0 commit comments

Comments
 (0)