Skip to content

Commit 27d1cbe

Browse files
committed
Show example output
1 parent c881642 commit 27d1cbe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ This package uses the HTTP controller doc blocks to create a table of contents a
6161
public function foo()
6262
```
6363

64+
**Result:** ![Doc block result](http://marcelpociot.com/documentarian/doc_block.png)
65+
6466
#### Form request validation rules
6567

6668
To display a list of valid parameters, your API methods accepts, this package uses Laravels [Form Requests Validation](https://laravel.com/docs/5.2/validation#form-request-validation).
@@ -72,10 +74,14 @@ public function rules()
7274
return [
7375
'title' => 'required|max:255',
7476
'body' => 'required',
77+
'type' => 'in:foo,bar',
78+
'thumbnail' => 'required_if:type,foo|image'
7579
];
7680
}
7781
```
7882

83+
**Result:** ![Form Request](http://marcelpociot.com/documentarian/form_request.png)
84+
7985
#### API responses
8086

8187
If your API route accepts a `GET` method, this package tries to call the API route with all middleware disabled to fetch an example API response.

0 commit comments

Comments
 (0)