Skip to content

Commit 1394f03

Browse files
authored
feat: add comment on regular Laravel routes (#22)
1 parent cf52b90 commit 1394f03

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

3.0/routing/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,3 +490,14 @@ JsonApiRoute::server('v1')
490490
$server->resource('posts', PostController::class);
491491
});
492492
```
493+
494+
## Writing Regular Laravel Routes
495+
496+
You are not constrained to just using the routing from this package!
497+
498+
If you need to create some routes and actions that deviate from JSON:API conventions,
499+
you can just create an endpoint in exactly the way you would when using Laravel -
500+
i.e. register a route, write a controller.
501+
502+
If you want to return a JSON:API response from the controller, you can use one of the
503+
package's [response classes](../responses/).

0 commit comments

Comments
 (0)