Skip to content
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

Addition of Inertia::response to handle both json and component #664

Open
wants to merge 5 commits into
base: 1.x
Choose a base branch
from

Conversation

Sarojb31
Copy link

Addition of Inertia::reponse to allow the single route to behave as API that sends props as JSON response if the header is set to 'Accept:application/json' and behave exact to render function if the following header is not matched

It allows to send the json response from same function used to serve the Inertia Render
Headers can be passed on request Accept:application/json for the json response
By default it will work as the normal render function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant