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
By default, your pages' routing will be done automatically for you so you don't have to worry about it.
328
+
329
+
To do that the package registers a fallback route which, when hit, will render your page.
330
+
331
+
If you want manual control over how your pages are rendered, you can disable this by setting the `routing.enabled` config option in your config file to `false`.
332
+
333
+
### Route prefix
334
+
335
+
If you so desire, you can add a prefix to be used in all your pages' routes. This is used in conjunction with auto-routing.
336
+
337
+
For instance: If a page has a slug `page-1`, and the prefix is set to `/pages`, then you'll access that page at the URL `/pages/page-1`.
338
+
339
+
> **Warning:** When changing the route prefix in the config, you'll want to run the `php artisan filament-fabricator:clear-routes-cache --refresh` command
340
+
341
+
### Hooking the route cache into Laravel's lifecycle
342
+
343
+
By default routes are properly cached, cleared, and refreshed whenever you would expect it to.
344
+
345
+
This is achieved by hooking into the following core commands:
346
+
347
+
-`cache:clear` -> clear routes cache
348
+
-`config:cache` -> refresh routes cache
349
+
-`config:clear` -> clear routes cache
350
+
-`optimize` -> refresh routes cache
351
+
-`optimize:clear` -> clear routes cache
352
+
-`route:clear` -> clear routes cache
353
+
354
+
If you don't want this behavior, you can opt out of it by setting the `hook-to-commands` config option to `false` in your config file.
0 commit comments