Skip to content

Commit

Permalink
Show example output
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed May 11, 2016
1 parent c881642 commit 27d1cbe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ This package uses the HTTP controller doc blocks to create a table of contents a
public function foo()
```

**Result:** ![Doc block result](http://marcelpociot.com/documentarian/doc_block.png)

#### Form request validation rules

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).
Expand All @@ -72,10 +74,14 @@ public function rules()
return [
'title' => 'required|max:255',
'body' => 'required',
'type' => 'in:foo,bar',
'thumbnail' => 'required_if:type,foo|image'
];
}
```

**Result:** ![Form Request](http://marcelpociot.com/documentarian/form_request.png)

#### API responses

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.
Expand Down

0 comments on commit 27d1cbe

Please sign in to comment.