You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: folio.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ php artisan folio:list
109
109
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:
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:
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:
134
134
135
135
```bash
136
-
php artisan make:folio "users/[id]"
136
+
php artisan folio:page"users/[id]"
137
137
138
138
# pages/users/[id].blade.php → /users/1
139
139
```
@@ -149,7 +149,7 @@ Captured segments can be accessed as variables within your Blade template:
149
149
To capture multiple segments, you can prefix the encapsulated segment with three dots `...`:
150
150
151
151
```bash
152
-
php artisan make:folio "users/[...ids]"
152
+
php artisan folio:page"users/[...ids]"
153
153
154
154
# pages/users/[...ids].blade.php → /users/1/2/3
155
155
```
@@ -170,7 +170,7 @@ When capturing multiple segments, the captured segments will be injected into th
170
170
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:
171
171
172
172
```bash
173
-
php artisan make:folio "users/[User]"
173
+
php artisan folio:page"users/[User]"
174
174
175
175
# pages/users/[User].blade.php → /users/1
176
176
```
@@ -194,7 +194,7 @@ On Windows, you should use `-` to separate the model name from the key: `[Post-s
194
194
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:
0 commit comments