Pav*_*lli 3 elixir phoenix-framework
按照这里的教程
https://www.youtube.com/watch?v=THUG8J3xSYw&list=PLtTtLKRL6UYGxOHToRYnXBynon5plZ7Jd&index=1
尝试使用脚手架生成模型。
我在终端试过这个
mix phx.gen.model Comment comments body:text post_id:references:posts
Run Code Online (Sandbox Code Playgroud)
但我在终端中得到以下信息:
** (Mix) The task "phx.gen.model" could not be found. Did you mean "phx.gen.html"?
Run Code Online (Sandbox Code Playgroud)
我在终端里试过这个
mix phoenix.gen.model Comment comments body:text post_id:references:posts
Run Code Online (Sandbox Code Playgroud)
但我在终端中得到以下信息:
** (Mix) The task "phoenix.gen.model" could not be found
Run Code Online (Sandbox Code Playgroud)
在 1.3 中,模型被弃用了。现在是模式
mix phx.gen.schema Comment comments body:text post_id:references:posts
Run Code Online (Sandbox Code Playgroud)