Install the Rails gem if you haven't done so before
use Phoenix.Component | |
import Phoenix.HTML | |
attr :myrows, :list, required: true | |
slot :mycol, required: true do | |
attr :label, :string | |
end | |
def table_1(assigns) do |
<script> | |
import { ref } from '@vue/composition-api' | |
import { onScrollBottom } from '@/scroll' | |
export default { | |
setup () { | |
function loadMore () { | |
// ... | |
} | |
# GenServer callbacks and return values | |
## init(args) | |
{:ok, state} | |
{:ok, state, timeout} | |
:ignore | |
{:stop, reason} | |
## handle_call(msg, {from, ref}, state) |
Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.
This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.
The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.
To grab the new archive, simply run:
defmodule DeeplyNested do | |
def get_nat_ip(input) do | |
steps = [first_map_with_key("accessConfigs"), | |
first_map_with_key("natIP") | |
] | |
get_in(input, steps) | |
end | |
defp first_map_with_key(key) do |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!