mix phx_filament.gen.resource (PhoenixFilament v0.1.0)

Copy Markdown View Source

Generates a PhoenixFilament resource for an Ecto schema.

Usage

mix phx_filament.gen.resource MyApp.Blog.Post
mix phx_filament.gen.resource MyApp.Blog.Post --repo MyApp.Repo.ReadOnly

What it does

  1. Creates a Resource module at lib/{app_web}/admin/{name}_resource.ex
  2. Attempts to register the resource in your Panel module automatically
  3. Falls back to printing instructions if the Panel module cannot be found or patched

Options

  • --repo / -r — Ecto Repo module to use. Auto-detected from use Ecto.Repo modules, defaults to {AppName}.Repo if none found.