Adminable v0.3.1 Adminable.Plug View Source
Plug for admin routes. Add this to your phoenix router
scope "/admin" do
pipe_through [:browser, :my, :other, :pipelines]
forward("/", Adminable.Plug, [
otp_app: :my_app,
repo: MyApp.Repo,
schemas: [MyApp.User],
view_module: MyAppWeb.Adminable.AdminView
layout: {MyAppWeb.LayoutView, "app.html"}
])
end
Arguments
otp_app
- Your apprepo
- Your app's Reposchemas
- The schemas to make Admin sections forview_module
- (Optional) The view_module to use to display pages. Uses Adminable's view module by default. You can export the view to modify usingmix adminable.gen.view MyWebModule
layout
- (Optional) The layout to use