Skip to content

Regular Laravel Routes #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions 3.0/routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,3 +490,14 @@ JsonApiRoute::server('v1')
$server->resource('posts', PostController::class);
});
```

## Writing Regular Laravel Routes

You are not constrained to just using the routing from this package!

If you need to create some routes and actions that deviate from JSON:API conventions,
you can just create an endpoint in exactly the way you would when using Laravel -
i.e. register a route, write a controller.

If you want to return a JSON:API response from the controller, you can use one of the
package's [response classes](../responses/).