mix phx.new vanilla_phoenix
cd vanilla_phoenix
mix deps.get
mix phx.gen.live Posts Post posts title:string hidden:boolean view:integer
[copy over routes]
mix ecto.setup
Setup live_admin
{:live_admin, "0.9.1"}
Router
import LiveAdmin.Router
scope "/", VanillaPhoenixWeb do
pipe_through :browser
# bla bla
live_admin "/admin" do
admin_resource("/posts", VanillaPhoenix.Posts.Post)
end
end
Resource Config in post.ex
defmodule VanillaPhoenix.Posts.Post do
use Ecto.Schema
use LiveAdmin.Resource
.
.
.
end
I set up an empty Phoenix project to make sure I was getting the configuration right, but ran into this error. Perhaps I made an error.
Steps to reproduce:
Setup live_admin
Router
Resource Config in post.ex
Start App
visit /admin and click to posts.
This is using latest phoenix/live_view