ArcanaWeb.Router (Arcana v2.0.1)

Copy Markdown View Source

Provides LiveView routing for the Arcana dashboard.

Usage

Add to your router:

import ArcanaWeb.Router

scope "/" do
  pipe_through :browser

  arcana_dashboard "/arcana"
end

Options

  • :live_socket_path - The path to the LiveView socket. Defaults to "/live".

  • :repo - The Ecto repo to use for Arcana operations. If not provided, falls back to Application.get_env(:arcana, :repo).

  • :on_mount - Optional list of Phoenix.LiveView.on_mount/1 callbacks to add to the dashboard's live_session.

Example with options

arcana_dashboard "/arcana",
  repo: MyApp.Repo,
  on_mount: [MyAppWeb.Auth]

Summary

Functions

Defines an Arcana dashboard route.

Functions

arcana_dashboard(path, opts \\ [])

(macro)

Defines an Arcana dashboard route.

It expects the path the dashboard will be mounted at and a set of options.