March 2018
Intermediate to advanced
304 pages
6h 59m
English
The first thing we’ll need is a simple way to list all the menu items that we have in our system so that we can then take further action upon them. If you aren’t super familiar with doing server-side rendering with Phoenix, don’t worry; we’ll cover everything you need to know here. In order to avoid writing a ton of HTML boilerplate, we’ll use one of the Phoenix generators and then we’ll replace the generated controller contents as needed. Run this in your shell:
| | $ mix phx.gen.html --no-context --no-schema Menu Item items |
| | $ rm test/plate_slate_web/controllers/item_controller_test.exs |
The first command generates some boilerplate HTML for us, and the second removes a test case we won’t ...
Read now
Unlock full access