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

Document password-protected routes

This commit is contained in:
Samuel Štancl 2021-08-08 20:21:22 +02:00 committed by GitHub
parent db15a0bdb9
commit 0235a28a72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,3 +116,18 @@ The package also uses another package of ours, [Laravel SEO](https://github.com/
```html ```html
<x-seo::meta /> <x-seo::meta />
``` ```
## Password-protected routes
The package also lets you protect certain routes with passwords. To add a password to a page, simply specify the `password` key in the YAML front matter:
```yaml
password: 'foo'
```
Now if a user wants to visit the page, he will **have to** include `?password=foo` in the URL, otherwise he'll be presented with a 403 error.
```diff
- /about
+ /about?password=foo
```