View Source Inertia.Controller (Inertia v0.2.0)

Controller functions for rendering Inertia.js responses.

Summary

Functions

Assigns a prop value to the Inertia page data.

Renders an Inertia response.

Functions

Link to this function

assign_prop(conn, key, value)

View Source
@spec assign_prop(Plug.Conn.t(), atom(), any()) :: Plug.Conn.t()

Assigns a prop value to the Inertia page data.

Link to this function

render_inertia(conn, component, props \\ %{})

View Source
@spec render_inertia(Plug.Conn.t(), component :: String.t(), props :: map()) ::
  Plug.Conn.t()

Renders an Inertia response.