Skip to content
This repository was archived by the owner on Sep 22, 2024. It is now read-only.

Commit 5103e30

Browse files
committed
update readme
1 parent 7d94408 commit 5103e30

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ return Responder::respond($data)
153153
->setStatusCode(201);
154154
```
155155

156+
### Specific resource classes
157+
158+
If you would like to specify a resource class it can be passed as the second parameter to the respond method:
159+
160+
```php
161+
return Responder::respond($data, UserResource::class);
162+
```
163+
156164
### Forcing the usage of API resources
157165

158166
If you want to force the usage of API resources, you have to set the `force_resources` option to `true` in the `config/responder.php` file.

0 commit comments

Comments
 (0)