Skip to content

Commit 0235a28

Browse files
authored
Document password-protected routes
1 parent db15a0b commit 0235a28

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,18 @@ The package also uses another package of ours, [Laravel SEO](https://github.com/
116116
```html
117117
<x-seo::meta />
118118
```
119+
120+
## Password-protected routes
121+
122+
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:
123+
124+
```yaml
125+
password: 'foo'
126+
```
127+
128+
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.
129+
130+
```diff
131+
- /about
132+
+ /about?password=foo
133+
```

0 commit comments

Comments
 (0)