Root view
Customizing the root view
Global configuration
ROOT_VIEW = "inertia_app"Local configuration
from masonite.controllers import Controller
from masonite.inertia import InertiaResponse
class HomeController(Controller):
def index(self, view: InertiaResponse):
"""This view will be rendered in 'home.html'."""
return view.render(
"Home",
{ "first_name": "Sam" },
custom_root_view="home"
)
def contact(self, view: InertiaResponse):
"""This view will be rendered in 'app.html'."""
return view.render("Contact")Last updated