1
0
Fork 0
mirror of https://github.com/archtechx/laravel-pages.git synced 2025-12-12 01:44:03 +00:00

Merge branch 'master' of github.com:archtechx/laravel-pages

This commit is contained in:
Samuel Štancl 2021-08-08 20:01:21 +02:00
commit db15a0bdb9

View file

@ -34,6 +34,8 @@ ArchTech\Pages\Page::routes();
This line will register the routes in a way that ensures that your routes take precedence, and the page route is only used as the final option.
**Important: Before attempting to visit URLs managed by this package, make sure that you configure it to use the correct layout (see the section below). Otherwise you might get an error saying that the view cannot be found.**
## Usage
### Markdown pages
@ -78,11 +80,11 @@ The config file lets you change:
- the view file used to render Markdown pages
- routing details
The layout is used *by* the vendor (package-provided) Markdown view. You'll likely want to set it to something like ``app-layout` or `layouts.app`.`
The layout is used *by* the vendor (package-provided) Markdown view. You'll likely want to set it to something like `app-layout` or `layouts.app`.
If you'd like to change the file that renders the Markdown itself, create `resources/views/pages/_markdown.blade.php` (the `_` prefix is important as it prevents direct visits) and change the `pages.views.markdown` config key to `pages._markdown`.
And if you'd like to customize the routing logic more ethan the config file allows you, simply register the route yourself (instead of calling `Page::routes()`):
And if you'd like to customize the routing logic more than the config file allows you, simply register the route yourself (instead of calling `Page::routes()`):
```php
Route::get('/{page}', ArchTech\Pages\PageController::class);