# `PhoenixFilament.Panel.Router`
[🔗](https://github.com/franciscpd/phoenix-filament/blob/main/lib/phoenix_filament/panel/router.ex#L1)

Provides the `phoenix_filament_panel/2` router macro.

## Usage

In your router:

    import PhoenixFilament.Panel.Router

    scope "/" do
      pipe_through [:browser]
      phoenix_filament_panel "/admin", MyApp.Admin
    end

## HTTP-level authentication

HTTP-level plug authentication (e.g. `EnsureAuthenticated`) should be
configured via `pipe_through` in your router scope surrounding the
`phoenix_filament_panel` call. This is the standard Phoenix pattern:

    scope "/admin" do
      pipe_through [:browser, :require_authenticated_user]
      phoenix_filament_panel "/", MyApp.Admin
    end

For LiveView-level auth, configure `:on_mount` in your panel module:

    use PhoenixFilament.Panel,
      path: "/admin",
      on_mount: {MyAppWeb.UserAuth, :require_authenticated_user}

The `:plug` panel option is kept for documentation purposes but cannot be
automatically injected by this macro due to Phoenix Router compile-time
constraints. Use `pipe_through` in your router instead.

# `phoenix_filament_panel`
*macro* 

---

*Consult [api-reference.md](api-reference.md) for complete listing*
