Router for mounting the Plato admin interface.
Usage
In your app's router:
defmodule MyAppWeb.Router do
use Phoenix.Router
import Plato.Router
scope "/" do
pipe_through :browser
plato_admin "/admin/cms", otp_app: :my_app
end
endThis will mount the admin UI at /admin/cms (or any custom path you choose).
Configuration
The admin will automatically use your app's configured repo:
config :my_app, :plato,
repo: MyApp.RepoCustom Paths
The path is completely configurable - mount at any location:
plato_admin "/cms", otp_app: :my_app
plato_admin "/admin/content", otp_app: :my_app
plato_admin "/backstage", otp_app: :my_app
Summary
Functions
Mounts the Plato admin interface at the given path.