Responses
Creating responses
To create an Inertia response, your controller method should send the name of Javascript page component as well as any props for the page. If you're using for example Vue.js on client-side the controller would pass some props to the given Vue.js component. The props are equivalent to the context that you can pass to a normal Masonite view.
To make an Inertia response, use the Inertia render function. This method takes the component name, and allows you to pass props.
app/http/controllers/EventsController.py
In this example we're passing a single prop, called event
to the Event/Show
page component.
You can also directly resolve inertia
instance in your controller
app/http/controllers/EventsController.py
Inertia.render()
Last updated