view<T extends Object> static method

Route view<T extends Object>(
  1. String route,
  2. dynamic controller
)

a route for the WebDAV VIEW HTTP method. It does not render a template like Laravel Route::view. For that, use a GET route: Route.get('welcome', (DoxRequest req) => view(req, 'welcome')) with view() of dox_view.

Route.view('path', controller);

Implementation

static Route view<T extends Object>(String route, dynamic controller) {
  return Route()._addRoute(
    HttpRequestMethod.VIEW,
    Route()._join(route),
    _action<T>(controller),
  );
}